Registering an interface in the Global Interface Table prevents destructor from being called
From: Michael Carr (mcarr_at_umich.edu)
Date: 03/01/05
- Next message: Tom Alter: "Re: How to hide activex control ?"
- Previous message: Praveen Krishnan: "Events Fail in ATL Containers when Enum Used as Event Parameter??"
- Next in thread: Kim Gräsman: "Re: Registering an interface in the Global Interface Table prevents destructor from being called"
- Reply: Kim Gräsman: "Re: Registering an interface in the Global Interface Table prevents destructor from being called"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 1 Mar 2005 01:59:40 -0500
I am writing an apartment threaded object that needs to share interfaces
across threads. In an initialization routine I create the Global Interface
Table and register one of my interfaces in it (IConnectionPointContainer,
specifically). Now, at any point after this if I release the object from my
client app, the destructor of my object is never called -- the app just
hangs. If I revoke the interface from the GID before releasing the object,
then the destructor is called correctly. To me, it appears that the GID is
holding a reference to the interface and preventing my destructor from ever
being called...however I don't want to rely on the client to call a cleanup
method before releasing the object because this object will be used in
Access VBA which creates and releases objects somewhat arbitrarily. Any
ideas?
Thanks!!
Michael Carr
- Next message: Tom Alter: "Re: How to hide activex control ?"
- Previous message: Praveen Krishnan: "Events Fail in ATL Containers when Enum Used as Event Parameter??"
- Next in thread: Kim Gräsman: "Re: Registering an interface in the Global Interface Table prevents destructor from being called"
- Reply: Kim Gräsman: "Re: Registering an interface in the Global Interface Table prevents destructor from being called"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|