Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Memory leaks when using Java GUI components in Matlab
Replies: 1   Last Post: Oct 14, 2007 4:09 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Mikhail

Posts: 70
From: Munich, Germany
Registered: 12/20/05
Re: Memory leaks when using Java GUI components in Matlab
Posted: Oct 14, 2007 4:09 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

With the kind help of Mathworks my problem is solved!

1. When a callback on a java gui element is defined then it should be

h = handle(jh, 'callbackproperties')
set(h, 'xxxCallback', @foo)

instead of

set(jh, 'xxxCallback', @foo)

2. When java gui object is being deleted then its components sould be EXPLICITLY set to empty:

jh = [];
h = [];

or possibly

delete(h)

3. Always use Matlab functions awtcreate() and awtinvoke() to correctly synchronize the threads (Event Dispatching Thread). Otherwise gui will not always/correctly respond/redraw



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.