How to dispose a MWStructArray contains dataset from JAVA MCR

4 ビュー (過去 30 日間)
Yong
Yong 2017 年 11 月 2 日
コメント済み: ding 2025 年 8 月 6 日
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 件のコメント
ding
ding 2025 年 8 月 6 日
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?

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeJava Package Integration についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by