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 28270 - Badly registered WeakListener
Summary: Badly registered WeakListener
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Module System (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jan Pokorsky
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 27563
  Show dependency tree
 
Reported: 2002-10-25 13:29 UTC by Tomas Pavek
Modified: 2008-12-23 08:34 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
allocation backtrace of the WeakListener (8.10 KB, text/html)
2002-10-25 13:34 UTC, Tomas Pavek
Details
the right stacktrace (4.92 KB, text/html)
2002-10-25 13:48 UTC, Tomas Pavek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Pavek 2002-10-25 13:29:44 UTC
[dev build 200210240100]
SerialDataConvertor.isModuleEnabled creates
WeakListener with reference to ModuleInfo object
(as source), but
ModuleInfoManager.registerPropertyChangeListener
adds the listener to something else
(ModuleInfoManager.PCL).
As result, the WeakListener cannot be
automatically removed when the listener is freed.
This causes one more WeakListener added
permanently each time a file is opened (issue
27563). Allocation stack trace attached.
Comment 1 Tomas Pavek 2002-10-25 13:34:31 UTC
Created attachment 7772 [details]
allocation backtrace of the WeakListener
Comment 2 Tomas Pavek 2002-10-25 13:48:00 UTC
Sorry, bad stacktrace attached, correcting...
Comment 3 Tomas Pavek 2002-10-25 13:48:41 UTC
Created attachment 7774 [details]
the right stacktrace
Comment 4 Jesse Glick 2002-10-25 14:48:26 UTC
Jan's code. I suspect MIM.PCL.addPCL should be changed from

    changeSupport = new PropertyChangeSupport(this);

to

    changeSupport = new PropertyChangeSupport(MIM.this);

But I think that would not work either because the MIM public methods
are not named according to the conventional names.
Comment 5 Jan Pokorsky 2002-10-30 18:02:09 UTC
You are right. It would not work. I am going to look at it.
Comment 6 Jan Pokorsky 2002-10-30 23:30:27 UTC
Fixed together with issue #16009. A proper source object is passed to
WeakListener.
Comment 7 Marian Mirilovic 2005-07-13 13:20:26 UTC
closed