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 104330 - AbstractJsfTopComponent$CBListener memory leak
Summary: AbstractJsfTopComponent$CBListener memory leak
Status: RESOLVED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Peter Zavadsky
URL:
Keywords: PERFORMANCE
Depends on: 104386
Blocks:
  Show dependency tree
 
Reported: 2007-05-18 23:26 UTC by Quy Nguyen
Modified: 2007-05-21 09:11 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Quy Nguyen 2007-05-18 23:26:23 UTC
In some cases, the AbstractJsfTopComponent$CBListener clipboard listener is not
unregistered from the NbClipboard object.

The componentDeactivated() method in JsfTopComponent is only called if the
design tab is selected when the component is closed.  If the java or jsp tabs
are selected, only componentClosed() is called, which does not unregister the
clipboard listener.
Comment 1 Peter Zavadsky 2007-05-21 08:25:59 UTC
The problem seems to be that when switching within multiview only the
componentActivated is called, but not the componentDeactivated. First filling a
bug against multiview impl.
Comment 2 Peter Zavadsky 2007-05-21 08:31:43 UTC
Created the issue #104386, the componentDeactivated is not called.

However I am gonna try to workaround this impl using weak listeners (same is
used in ExplorerActionsImpl), so the problem doesn't persist after closing the
component.
Comment 3 Peter Zavadsky 2007-05-21 09:11:42 UTC
Fixed:

Now the listener is made weak, so it shouldn't cause the memory leak anymore.

Checking in
visualweb/designer/jsf/src/org/netbeans/modules/visualweb/designer/jsf/ui/AbstractJsfTopComponent.java;
/cvs/visualweb/designer/jsf/src/org/netbeans/modules/visualweb/designer/jsf/ui/AbstractJsfTopComponent.java,v
 <--  AbstractJsfTopComponent.java
new revision: 1.7; previous revision: 1.6
done