Main Content
matlab.lang.WeakReference Class
Namespace: matlab.lang
Description
Use the matlab.lang.WeakReference
class to create a weak reference to a
handle object. The handle object can already exist, or you can create an instance of this
class with a placeholder handle object. For more information on weak reference behavior in
MATLAB®, see Weak Reference Handles.
Creation
Description
wr = matlab.lang.WeakReference
creates a weak reference to a
handle object. When no argument is specified, the Handle
property is set to a handle to a deleted object of type matlab.lang.HandlePlaceholder
.
wr = matlab.lang.WeakReference(obj)
creates an instance with the
Handle
property set to a scalar handle object
obj
.
Properties
Examples
Version History
Introduced in R2024b