Benchmark clear() behavior with OOP handle

Examine Matlab's "clear" behavior with different handle reference configurations.
393 Downloads
Updated 30 Mar 2016

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 (2024). Benchmark clear() behavior with OOP handle (https://www.mathworks.com/matlabcentral/fileexchange/23132-benchmark-clear-behavior-with-oop-handle), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2008b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Graphics Object Programming in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.1.0.0

Administrator requested update in order to auto-add BSD license.

1.0.0.0