This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Created attachment 152164 [details] Reference root Finished debugger session retains in memory due to a leak caused by org.netbeans.modules.debugger.ui.models.WatchesTreeModel, which in it's "listeners" field holds Models.CompoundTreeModel delegating to the JPDA's WatchesModel and JPDADebuggerImpl.
Fixed by changeset: 287723:72e61818969b http://hg.netbeans.org/core-main/rev/72e61818969b
Integrated into 'main-silver', will be available in build *201505140001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/72e61818969b User: mentlicher@netbeans.org Log: #250636: Assure that the JPDADebuggerImpl instance is not held strong after the session finishes.
Integrated into 'main-silver', will be available in build *201505170001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/15bffbbd85ef User: mentlicher@netbeans.org Log: #250636: Additional fix to enable to free the debugger session-related objects from memory.
Created attachment 159398 [details] Test case
We are using your OutlineView Model in our RCP application and when we moved to NB RCP 8.1 we found out that maximizing the TopComponent in whom the OutlineView was put, made the OutlineView resets its model. This also happens when you drag the TopComponent to another mode. We took a look at the code and we noticed that you call setModel(null) in the removeNotify method of org.netbeans.modules.viewmodel2.OutlineTable. We understand that you do this to avoid memory leaks, but this is giving us some problems. IMHO it should the one that sets the model to reset it and not be hidden in the API (see org.netbeans.modules.debugger.ui.views,View where only addNotify is overridden) . We made a workaround in our application and we are looking forward to see a better fix in the future.
(In reply to scanti from comment #5) > We are using your OutlineView Model in our RCP application and when we moved > to NB RCP 8.1 we found out that maximizing the TopComponent in whom the > OutlineView was put, made the OutlineView resets its model. This also > happens when you drag the TopComponent to another mode. > > We took a look at the code and we noticed that you call setModel(null) in > the removeNotify method of org.netbeans.modules.viewmodel2.OutlineTable. > > We understand that you do this to avoid memory leaks, but this is giving us > some problems. IMHO it should the one that sets the model to reset it and > not be hidden in the API (see org.netbeans.modules.debugger.ui.views,View > where only addNotify is overridden) . > > We made a workaround in our application and we are looking forward to see a > better fix in the future. @scanti: Reopening a fixed issue from a released version won't get the attention you want. Please file a new issue and refer to this one. BTW: Document your workaround in the issue, so other developers can adapt your workaround too. Reverting state to resolved fixed.