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 58100 - CallbackSystemAction's weak PropertyChangeListener instances are kept attached to actions
Summary: CallbackSystemAction's weak PropertyChangeListener instances are kept attache...
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Actions (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: Antonin Nebuzelsky
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2005-04-20 14:29 UTC by Antonin Nebuzelsky
Modified: 2008-12-22 22:45 UTC (History)
2 users (show)

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 Antonin Nebuzelsky 2005-04-20 14:29:55 UTC
CallbackSystemAction's innerclass DelegateAction attaches weak
PropertyChangeListener to the associated action. When the DelegateAction is
disposed the weak listener is kept attached. I am adding finalizer to the
DelegateAction which detaches the weak listener.

The fix is verified by the introduced test, added to CallbackSystemActionTest
class. If I run the test on the original CallbackSystemAction without the
finalizer, the listener is verified kept attached. With the fix the test
verifies that the listener goes away.
Comment 1 Antonin Nebuzelsky 2005-04-20 14:40:36 UTC
Checking in test/unit/src/org/openide/util/actions/CallbackSystemActionTest.java;
/cvs/openide/test/unit/src/org/openide/util/actions/CallbackSystemActionTest.java,v
 <--  CallbackSystemActionTest.java
new revision: 1.13; previous revision: 1.12
done
Checking in src/org/openide/util/actions/CallbackSystemAction.java;
/cvs/openide/src/org/openide/util/actions/CallbackSystemAction.java,v  <-- 
CallbackSystemAction.java
new revision: 1.40; previous revision: 1.39
done
Comment 2 Jaromir Uhrik 2005-07-14 16:18:21 UTC
Verified.