Borrar filtros
Borrar filtros

Selfdestruction of an object

4 visualizaciones (últimos 30 días)
rocketMan
rocketMan el 12 de Mzo. de 2022
Comentada: rocketMan el 13 de Mzo. de 2022
Hey,
is it possible to make an object destroy itself and how?

Respuesta aceptada

Walter Roberson
Walter Roberson el 12 de Mzo. de 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.

Más respuestas (0)

Categorías

Más información sobre Problem-Based Optimization Setup en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by