How to dispose a MWStructArray contains dataset from JAVA MCR
4 views (last 30 days)
Show older comments
I use JAVA MCR to load matlab object from file (or generated them from MCR call), then I will dispose the MWStructArray after some work. It work most of case, MCR release the memory (the memory consumed by the java process will do down). But when the matlab struct contains lots of dataset object in its fields, dispose the MWStructArray will not release memory. Is this a bug? Any special code can release the memory?
I use matlab runtime 2016a
1 Comment
ding
on 6 Aug 2025
I encounter the same issue when i use java to call Matlab code. The memory used by the program seemed not be released every time i called the matlab algorithm and caused OOM.I carefully check my code and use MWarray.dispose(XX) but seemed has no effect.My program is complex and has a lot of Input which I put in a MWStructArray to call the matlab code. Can anyone help me?
Answers (0)
See Also
Categories
Find more on Java Package Integration in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!