Implementing a weak reference in Matlab

5 visualizzazioni (ultimi 30 giorni)
Jim Hokanson
Jim Hokanson il 7 Nov 2014
Spostato: Adam Danz il 4 Apr 2025
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?

Risposte (1)

Nikolaus Koopmann
Nikolaus Koopmann il 19 Lug 2024
Spostato: Adam Danz il 4 Apr 2025

Categorie

Scopri di più su Programming in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by