フィルターのクリア

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.
  1 件のコメント
rocketMan
rocketMan 2022 年 3 月 13 日
Thank you!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProblem-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