]
Gary Brown updated RTGOV-112:
-----------------------------
Fix Version/s: 1.1
(was: 1.0.0.M5)
Experiment with using WeakRef for list of active change listeners
-----------------------------------------------------------------
Key: RTGOV-112
URL:
https://issues.jboss.org/browse/RTGOV-112
Project: RTGov (Run Time Governance)
Issue Type: Task
Reporter: Gary Brown
Assignee: Gary Brown
Priority: Minor
Fix For: 1.1
Currently the ActiveCollection uses a standard list to maintain the list of active change
listeners interested in changes to the collection.
The issue with this approach is if clients setup active change listeners, but then fail
to unregister them when they are no longer required. This could lead to an accumulation of
unnecessary listeners, causing the collection to do more work than required when
distributing change notifications.
One approach to overcome this would be to use a list of WeakReferences to the listeners,
so then we don't need to rely on the clients to tidy up.
We need to experiment with the performance implications of such a change, including
explicit removal of the listener, which would need to iterate through the list of
listeners to check each reference in turn - although this should be a relatively
infrequent task, so hopefully shouldn't impact the overall performance too much.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: