Selfdestruction of an object
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
rocketMan
am 12 Mär. 2022
Kommentiert: rocketMan
am 13 Mär. 2022
Hey,
is it possible to make an object destroy itself and how?
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 12 Mär. 2022
If you have a handle object, then when it is constructed, or upon any relevant event, it can create a timer that does a delete() of the object. This will affect all places that have a copy of the handle.
If you have a value object, then NO, the most you could do would be to destroy a copy of the object, but all the other copies would be intact.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Problem-Based Optimization Setup finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!