DataStore & DataElements leaked when deleting a connection
Bugzilla Link | 456090 |
Status | NEW |
Importance | P3 normal |
Reported | Dec 23, 2014 11:31 EDT |
Modified | Dec 23, 2014 11:31 EDT |
Version | 3.5 |
Reporter | Alan Staves |
Description
When a DStore connection is deleted the DataStore object itself is never garbage collected as there are several references held by live objects.
Steps to reproduce the problem
- Create a DStore connection (e.g. Linux) and make the connection by expanding the Files element in the RSE view and entering user-id & password
- Disconnect the connection
- Delete the connection
Now take a heap dump (I used jvisualvm) and look to see how many DataStore and referenced objects are still in the heap - you will find that the DataStore object although deleted has not been garbage collected and it has references to 10,000 DataElements in the recycle cache.
Each time you delete a connection the DataStore is not released if the connection was activated.
There seem to be several causes of this, a couple I found are below but there may be others:
- StatusMonitorFactory has a map of StatusMonitor objects which have a reference to the DataStore
- DStoreFileAdapter creates and registers a RemoteFilePropertyChangeListener but is never removed and it has a reference to the DataStore