The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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 ]

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


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]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.