I am trying to figure out if I can re-use same QuoteCache object
in my subscribe, I do something like below.
quoteCacheControl = New RediLib.CacheControl
qCache = New QuoteCache(quoteCacheControl, symbol)
qCache.Subscribe()
QuoteDict.Add(symbol, qCache)
In my unsubscribe, I find quoteCache in my collection and unsubscribe
Dim qc1 As QuoteCache = Nothing
If QuoteDict.TryGetValue(symbol, qc1) Then
qc1.Subscribe()
End If
If I looped through my collection of QuoteCache objects and unsubscribed from all symbols but did not remove quoteCache object that was unsubscribed
Can I later loop through that same collection and subscribe again or is the QuoteCache object destroyed on unsubscribe?