When handle objects are released created inside static methods
이전 댓글 표시
I have played with the example code showed in https://se.mathworks.com/help/matlab/matlab_oop/example-using-events-to-update-graphs.html
In the static function createViews of class fcnview, 7 fcnview objects are created and 4 of them are saved in the array fcnviewobj. I have some questions:
- Why the 3 objects in the array fcnviewobj which are replaced in the last 3 loops are not released/destroyed since no one will use them. (These 3 objects are released after the figure is closed.)
- Those 4 objects in the array fcnviewobj are not released after the figure is closed, why? (They are not released even I call fcnview.createViews again.)
- How Matlab manages these kind of variables?
Thanks a lot!
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!