File Exchange

image thumbnail

Benchmark clear() behavior with OOP handle

version (1.77 KB) by Benjamin Heasly
Examine Matlab's "clear" behavior with different handle reference configurations.

1 Download

Updated 30 Mar 2016

View Version History

View License

Create N handle objects, store 1-3 references to each.
Order of object creation, number of references, and configuration of references all have drastic impact on "clear" time as function of number of objects. Times range from flat, to linear, to quadratic.

Using a simple handle class:
% % classdef simpleHandle < handle
% % properties
% % ref1;
% % ref2;
% % end
% % methods
% % function self = simpleHandel
% % end
% % end
% % end

Cite As

Benjamin Heasly (2021). Benchmark clear() behavior with OOP handle (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (1)

Nguyen Thieu

Check out my lastest framework for benchmark functions using python (numpy).

MATLAB Release Compatibility
Created with R2008b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!