[QFJ-93] Remove Session objects from global map when Acceptors and Initators are destroyed Created: 31/Oct/06  Updated: 12/Apr/07  Resolved: 07/Nov/06

Status: Closed
Project: QuickFIX/J
Component/s: Engine
Affects Version/s: None
Fix Version/s: 1.1.0

Type: Improvement Priority: Default
Reporter: Kevin Koltzau Assignee: Steve Bate
Resolution: Fixed Votes: 0
Labels: None


 Description   

Once a session is created, it is never destroyed. Native Quickfix destroys created sessions when the Initiator or Acceptor that created it is destroyed.



 Comments   
Comment by Steve Bate [ 31/Oct/06 ]

Can you describe further why it's important for your application have the sessions garbage collected?

Comment by Kevin Koltzau [ 01/Nov/06 ]

Our application constructs Initiators & Acceptors on demand, and they are garbage collected when no longer used. The application is long lived, and this is essentially a memory leak.
Idealy we would like a method to destroy Initiators & Acceptors on demand rather then waiting for the garbage collector, but in all cases to also destroy the contained sessions.
This is the only major issue we currently have with Quickfix/J that is preventing us from switching from native Quickfix and JNI.

Comment by Steve Bate [ 01/Nov/06 ]

I'll make the sessions map a weak hash map. That way the sessions will be garbage collected when they are no longer referenced by anything other than the map. Will that work for you? If so, I'll make the change for QFJ 1.1. In the meantime, you could make the simple change the Session.java class build a custom version of QFJ so your deployment is not blocked.

Generated at Sat Nov 23 10:54:55 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.