Hi,
Please feel free to treat this as support request. We believe we are experiencing a fairly significant memory lead using a ULCDialog (with a client-side extension). Our application is fairly complex, and before we start to diagnose the problem, I would like to confirm that bug UBA 1053- "Memory leak for ULCDialogs that have an owner (i.e. a parent window)" has in fact been fixed. When I run a simple test, I notice that there still appears to be a leak. The dialog used in the test uses ULCDialog.DISPOSE_ON_CLOSE and has a ULCFrame as its owner. This is similar to our application. When I run the sample program below, which I used from a similar email : http://lists.canoo.com/mailman/private/ulc-developer/2005/002598.html, the application doesn't appear to release all memory. For example: Before: Total - 4232KB Used - 3981.03 After 50 dialog objects created - Total - 5776KB Used - 4303KB After 50 dialog objects disposed - - 5776KB Used - 5731KB Any tips or hints would be appreciated. Kind regards, Les Sample program: import com.ulcjava.base.application.AbstractApplication; import com.ulcjava.base.application.*; import com.ulcjava.base.application.event.IActionListener; import com.ulcjava.base.development.DevelopmentRunner; import com.ulcjava.base.application.event.ActionEvent; public class Example extends AbstractApplication { public void start() { final ULCFrame mainFrame = new ULCFrame("MemoryTestApplication"); mainFrame.setSize(600, 400); mainFrame.setDefaultCloseOperation(com.ulcjava.base.application. ULCFrame.TERMINATE_ON_CLOSE); ULCBoxPane layoutPane = new ULCBoxPane(); mainFrame.add(layoutPane); ULCButton button = new ULCButton("open dialog"); layoutPane.add(button); button.addActionListener(new IActionListener() { public void actionPerformed(ActionEvent event) { System.out.println(">>>>> Dialog free memory: " + Runtime.getRuntime().freeMemory() + " / max " + Runtime.getRuntime().maxMemory()); ULCDialog dialog = new ULCDialog(mainFrame, "Test", false); dialog.setDefaultCloseOperation(ULCDialog.DISPOSE_ON_CLOSE); dialog.add(new ULCTree()); dialog.setVisible(true); }; }); ULCButton memoryButton = new ULCButton("Display Memory"); memoryButton.addActionListener(new IActionListener() { public void actionPerformed(ActionEvent event) { System.out.println(">>>>> Memory - free memory: " + Runtime.getRuntime().freeMemory() + " / max " + Runtime.getRuntime().maxMemory()); }; }); layoutPane.add(memoryButton); mainFrame.setVisible(true); } public static void main(String[] args) { DevelopmentRunner.setApplicationClass(Example.class); DevelopmentRunner.main(args); } }
