You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
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 (2026). Benchmark clear() behavior with OOP handle (https://www.mathworks.com/matlabcentral/fileexchange/23132-benchmark-clear-behavior-with-oop-handle), MATLAB Central File Exchange. Retrieved .
Categories
Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and MATLAB Answers
General Information
- Version 1.1.0.0 (1.77 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
