Skip to main content

using multiple universes gives memory leak

2 replies [Last post]
ppelzman
Offline
Joined: 2004-10-06

I use 2 differents panels with each having its own universe and canvas3d.
When I show a dialog with any one of these 2 panels and I dispose the
dialog, the memory is freed.
when I show a dialog with the 2 panels at the same time, only the memory relative
to 1 panel is released.

MasterControl manage a list of registered views which does'nt consider the owning universe.
This gives a problem when Locale.removeBranchGraph is called and EMPTY_UNIVERSE is forwarded
to MasterControl

private void handlePendingRequest() {
...
} else if (type == EMPTY_UNIVERSE) {
if (views.isEmpty()) { // false for first universe cleared !!!
destroyUniverseThreads((VirtualUniverse) o);
...
}
...
}

Philippe

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jada
Offline
Joined: 2004-03-17

This looks like a bug to us. If you can file an issue, with a simple test program, we will look into it.
Or even better, sign the JCA and submit your suggested fix, we will be more than happy to review it.

thanks,

Chien.

kcr
Offline
Joined: 2004-03-17

As it turns out, this is the root cause of Issue 81, which I discovered yesterday. So we already have a test program for this (and a fix). Thanks for reporting the problem as it made finding and fixing Issue 81 easier.

https://java3d.dev.java.net/issues/show_bug.cgi?id=81

-- Kevin

Message was edited by: kcr