title: clear Java memory
body: <p>I am using Matlab 2012b to connect to another program (Imaris) from which I import data. The communication actually happens via java as interface. The problem I have is that the data is not deleted from the Java memory and piles up over time until Matlab ultimately crashes. 
  "clear Java" does not work and produces the following warning: "Objects of Ice/ConnectionRefusedException class exist - not clearing"</p>
  
  <p>The only solution I found to really clear the Java memory is to restart Matlab, which is not an option in my case.</p>
  
  <p>When searching through the web I found that quite a few people have encoutered the same problem. (<a href="http://www.mathworks.de/matlabcentral/newsreader/view_thread/283708" rel="nofollow">http://www.mathworks.de/matlabcentral/newsreader/view_thread/283708</a>)</p>
  
  <p>However I did not find an answer how to solve the issue. Does anybody know a solution?</p>