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 47166 - Objects from o.n.c.output2 package are leaking
Summary: Objects from o.n.c.output2 package are leaking
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Output Window (show other bugs)
Version: 4.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: _ tboudreau
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2004-08-12 16:46 UTC by Antonin Nebuzelsky
Modified: 2008-12-22 22:37 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
List of leaking objects (79.42 KB, image/png)
2004-08-12 16:47 UTC, Antonin Nebuzelsky
Details
4 leaked instances of OutputTab (69.33 KB, image/png)
2004-08-12 16:48 UTC, Antonin Nebuzelsky
Details
Detail of leaked OutputTab (71.79 KB, image/png)
2004-08-16 11:10 UTC, Antonin Nebuzelsky
Details
PMListener instance 1 (73.37 KB, image/png)
2004-08-16 16:55 UTC, Antonin Nebuzelsky
Details
PMListener instance 2 (73.36 KB, image/png)
2004-08-16 16:56 UTC, Antonin Nebuzelsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Antonin Nebuzelsky 2004-08-12 16:46:09 UTC
I did several times Clean And Build on a project.
When I closed the output window with the ant
output using its popup (its Close item), there
were several instances of objects from
o.n.core.output2 package left in memory (see the
first screenshot below). You can see in the
reference path of OutputTab (see the second
screenshot) that it is kept in memory through the
popup menu...
Comment 1 Antonin Nebuzelsky 2004-08-12 16:47:33 UTC
Created attachment 16783 [details]
List of leaking objects
Comment 2 Antonin Nebuzelsky 2004-08-12 16:48:17 UTC
Created attachment 16784 [details]
4 leaked instances of OutputTab
Comment 3 _ tboudreau 2004-08-14 12:20:54 UTC
Now removes all items from the popup menu when it's hidden, and sets its invoker to null.

Checking in src/org/netbeans/core/output2/Controller.java;
/cvs/core/output2/src/org/netbeans/core/output2/Controller.java,v  <--  Controller.java
new revision: 1.11; previous revision: 1.10
done
Comment 4 Antonin Nebuzelsky 2004-08-16 11:08:50 UTC
Still leaking, through listener. See the following attachment.
Comment 5 Antonin Nebuzelsky 2004-08-16 11:10:19 UTC
Created attachment 16835 [details]
Detail of leaked OutputTab
Comment 6 _ tboudreau 2004-08-16 11:45:22 UTC
Okay, I now null out the client properties used in the menu as well - let me know if there's 
still another path for it to leak.

Checking in Controller.java;
/cvs/core/output2/src/org/netbeans/core/output2/Controller.java,v  <--  Controller.java
new revision: 1.15; previous revision: 1.14
done
Comment 7 Antonin Nebuzelsky 2004-08-16 16:55:01 UTC
Sorry, Tim, I still see one thing leaking, instances of
o.n.c.output2.Controller$PMListener. See the attached screenshots.
Comment 8 Antonin Nebuzelsky 2004-08-16 16:55:32 UTC
Created attachment 16858 [details]
PMListener instance 1
Comment 9 Antonin Nebuzelsky 2004-08-16 16:56:02 UTC
Created attachment 16859 [details]
PMListener instance 2
Comment 10 _ tboudreau 2004-08-16 17:35:37 UTC
Okay, the listener now removes itself too.

Checking in Controller.java;
/cvs/core/output2/src/org/netbeans/core/output2/Controller.java,v  <--  Controller.java
new revision: 1.16; previous revision: 1.15
done

I predict that next you'll ask that I iterate all of the menu items and cause themselves to 
remove themselves as listeners on the array of Actions, which Controller holds...am I right?
Comment 11 Antonin Nebuzelsky 2004-08-16 17:51:25 UTC
Exactly... ;o)
Comment 12 _ tboudreau 2004-08-17 03:15:02 UTC
Okay, listeners are cleared whenever the popup is hidden now.

Checking in Controller.java;
/cvs/core/output2/src/org/netbeans/core/output2/Controller.java,v  <--  Controller.java
new revision: 1.17; previous revision: 1.16
done
Comment 13 _ tboudreau 2004-08-17 03:30:19 UTC
x
Comment 14 Antonin Nebuzelsky 2004-08-17 10:31:28 UTC
Verified.