Implementing a weak reference in Matlab
Mostrar comentarios más antiguos
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 comentarios
Jim Hokanson
el 25 de Mzo. de 2020
Walter Roberson
el 19 de Jul. de 2024
(The solution mentioned by @Nikolaus Koopmann is for the upcoming R2024b, and is not yet an official part of MATLAB.)
Respuestas (1)
Nikolaus Koopmann
el 19 de Jul. de 2024
Movida: Adam Danz
el 4 de Abr. de 2025
0 votos
Categorías
Más información sobre Programming en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!