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.

Bug 55273

Summary: Dialogs created by DialogDisplayer are not disposed after close
Product: platform Reporter: _ rkubacki <rkubacki>
Component: Dialogs&WizardsAssignee: Jiri Rechtacek <jrechtacek>
Status: RESOLVED FIXED    
Severity: blocker CC: issues
Priority: P3 Keywords: PERFORMANCE, SIMPLEFIX
Version: 4.x   
Hardware: PC   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: a patch

Description _ rkubacki 2005-02-21 09:50:00 UTC
There is serious problem in our implementation of
DialogDisplayer in o.n.core.windows.services.
Dialogs provided by this service are not disposed
when user closes them so they are retained in
memory by reference from their native peer. This
is cause of bugs like issue #55015.

Note that org.openide.DialogDisplayer$Trivial
implementation do not suffer from this and the
code here is correct
Comment 1 _ rkubacki 2005-02-21 12:50:15 UTC
This is kind of regression coming from fix for issue #49467. Probably
we should clarify in documentation what is the policy when the dialog
is closed and allow users to modify this behaviour correctly. The
default should be dispose on close as it will prevent possible leaks.

Places where dialog is reused should work even with dispose calls but
it will be better for them to override this option. Anyway we may need
to check how many places in our codebase reuses dialogs so it might be
better to do it for next release.
Comment 2 _ tboudreau 2005-03-28 13:02:38 UTC
Should be harmless to dispose DialogDisplayer's dialog after it's been closed - shouldn't cause any harm.
Comment 3 Jiri Rechtacek 2005-12-06 08:49:29 UTC
Created attachment 27573 [details]
a patch
Comment 4 Jiri Rechtacek 2005-12-06 08:51:06 UTC
I attached a simple patch but the covering test still fails.
Comment 5 Jiri Rechtacek 2005-12-12 14:47:13 UTC
Checking in NbPresenter.java;
/shared/data/ccvs/repository/core/windows/src/org/netbeans/core/windows/services/NbPresenter.java,v
 <--  NbPresenter.java
new revision: 1.27; previous revision: 1.26
done