Matlab Scripting: "RRATool" Memory Leak?
Posted: Sat Apr 06, 2013 4:49 pm
Hello,
I'm able to use Matlab scripting (on both 2012a and 2013a) to successfully run RRA on a model. However, each time I execute rraTool.run(); in Matlab, the physical memory usage of Matlab increases. I'm using this command in a loop, and after about 20 iterations, I run out of physical memory and the program freezes. My physical memory monitor shows a uniform, incremental increase in memory usage.
I've tried a variety of memory clearing techniques (clear java, clear all, clear classes, etc) but have not been able to stop the memory usage from increasing during each iteration. Closing Matlab frees the memory. I've heard that using handles on Java objects may prevent memory leaks in Matlab, but that didn't seem to work for me. I'm not sure if I was implementing the handles correctly however.
I was interested in knowing if there is a way to prevent the memory usage from increasing with each iteration.
Thanks,
Stephen
I'm able to use Matlab scripting (on both 2012a and 2013a) to successfully run RRA on a model. However, each time I execute rraTool.run(); in Matlab, the physical memory usage of Matlab increases. I'm using this command in a loop, and after about 20 iterations, I run out of physical memory and the program freezes. My physical memory monitor shows a uniform, incremental increase in memory usage.
I've tried a variety of memory clearing techniques (clear java, clear all, clear classes, etc) but have not been able to stop the memory usage from increasing during each iteration. Closing Matlab frees the memory. I've heard that using handles on Java objects may prevent memory leaks in Matlab, but that didn't seem to work for me. I'm not sure if I was implementing the handles correctly however.
I was interested in knowing if there is a way to prevent the memory usage from increasing with each iteration.
Thanks,
Stephen