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 28272 - Multiple use of one WeakListener instance
Summary: Multiple use of one WeakListener instance
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: -S1S-
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 27563
  Show dependency tree
 
Reported: 2002-10-25 14:42 UTC by Tomas Pavek
Modified: 2007-09-26 09:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
WeakListener creation stack trace (8.10 KB, text/html)
2002-10-25 14:43 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 14:42:47 UTC
One WeakListener created in ClassChildren (see the
attached stacktrace) is used multiple times - also
for listening on sub-elements of the class
(fields, methods, constructors). I guess it
happens in ClassChildren.hookNodeName(). When the
referenced listener is freed, the WeakListener
removes itself automatically only from
ClassElement it was originally created for, but
not from all the sub-elements. So e.g. with each
opening of a java file (see issue 27563), one more
WeakListener is leaked plus bunch of
LinkedList.Entry (used to store listeners in
ElementImpl).
Comment 1 Tomas Pavek 2002-10-25 14:43:20 UTC
Created attachment 7776 [details]
WeakListener creation stack trace
Comment 2 Tomas Pavek 2002-10-25 15:14:13 UTC
Forgot to mention: this is in trunk, build 200210240100. Don't know
how this will change in projects, but this is rather subtle problem
that can generally happen on many places.
Comment 3 Svata Dedic 2003-02-26 12:26:36 UTC
/cvs/java/srcmodel/src/org/openide/src/nodes/ClassChildren.java,v  <--
 ClassChildren.java
new revision: 1.3; previous revision: 1.2
Comment 4 Jan Becicka 2003-02-27 12:31:55 UTC
Reporter, could you verify this bug? Thanks
Comment 5 Jan Becicka 2003-04-01 08:24:45 UTC
VERIFIED
Comment 6 Quality Engineering 2007-09-20 12:02:40 UTC
Reorganization of java component