Selfdestruction of an object
조회 수: 4 (최근 30일)
이전 댓글 표시
Hey,
is it possible to make an object destroy itself and how?
댓글 수: 0
채택된 답변
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 Center 및 File Exchange에서 Get Started with Optimization Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!