필터 지우기
필터 지우기

Selfdestruction of an object

조회 수: 4 (최근 30일)
rocketMan
rocketMan 2022년 3월 12일
댓글: rocketMan 2022년 3월 13일
Hey,
is it possible to make an object destroy itself and how?

채택된 답변

Walter Roberson
Walter Roberson 2022년 3월 12일
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.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Problem-Based Optimization Setup에 대해 자세히 알아보기

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by