How to dispose a MWStructArray contains dataset from JAVA MCR

조회 수: 5 (최근 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 CenterFile Exchange에서 Java Package Integration에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by