Implementing a weak reference in Matlab

조회 수: 5 (최근 30일)
Jim Hokanson
Jim Hokanson 2014년 11월 7일
이동: Adam Danz 2025년 4월 4일
When someone makes a request for an object with certain parameters, I'd like to return an existing object (of handle type) if the parameters match accordingly. Unfortunately, if the object server holds onto the object so that it can be returned instead of a new object, the object will never be cleared. If the object server is the only thing holding onto the object, then I want it to be cleared.
Is this possible?
  댓글 수: 2
Walter Roberson
Walter Roberson 2024년 7월 19일
(The solution mentioned by @Nikolaus Koopmann is for the upcoming R2024b, and is not yet an official part of MATLAB.)

댓글을 달려면 로그인하십시오.

답변 (1개)

Nikolaus Koopmann
Nikolaus Koopmann 2024년 7월 19일
이동: Adam Danz 2025년 4월 4일

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by