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 - Dialogs created by DialogDisplayer are not disposed after close
Summary: Dialogs created by DialogDisplayer are not disposed after close
Alias: None
Product: platform
Classification: Unclassified
Component: Dialogs&Wizards (show other bugs)
Version: 4.x
Hardware: PC All
: P3 blocker (vote)
Assignee: Jiri Rechtacek
Depends on:
Reported: 2005-02-21 09:50 UTC by _ rkubacki
Modified: 2008-12-22 23:50 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

a patch (4.83 KB, patch)
2005-12-06 08:49 UTC, Jiri Rechtacek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description _ rkubacki 2005-02-21 09:50:00 UTC
There is serious problem in our implementation of
DialogDisplayer in
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;
new revision: 1.27; previous revision: 1.26