Click here to Skip to main content
15,905,071 members

Comments by narayanagvs (Top 2 by date)

narayanagvs 15-Apr-11 10:41am View    
IMxcallback doesn't implement IDisposable but Userconnection call back object does.

public class aaUserConnectionCallback : IMxCallback, IDisposable
-----------------------------------------------------------------------------
IMxcallback is created in the below manner.

if ((object)userConnectionCallback == null &&
(l_subscriptionClient.m_isIntouchTag || l_subscriptionClient.DataSourceType == aaDataSourceType.AutomationObjectAttribute))
{
userConnectionCallback = new aaUserConnectionCallback();
}

IMxCallback mxCallback = userConnectionCallback as IMxCallback;
narayanagvs 15-Apr-11 9:33am View    
Eventhough I am using native interface , I am disposing it.I also implemented your suggestion of calling dispose in a secured way.But my client calls dispose properly and both Managed and unmanaged resources are cleaned.
Now while debugging the code in dispose I could notice that eventhough I have cleared the hashtable.The buckets in hashtable are not cleared.I even assigned null to hashtable after clearing it but still there are hashtable and hashtable bucket objects in the heap.