Board index » delphi » Destructor not called on COM exit

Destructor not called on COM exit

Looks like a problem with reference counting. Are you passing an interface
pointer of your COM-object to your DCOM-object ?

--
==============================================
Rob Lans
Software Engineer
Eco Chemie B.V.

Remove (nospam) to reply.
==============================================

Andrew D. Parkin <andrewdpar...@xxx.com> wrote in message
news:3ad422a8$1_1@dnews...

Quote
> Hi,

> I have a COM component created in Delphi 5 that can create a DCOM
component
> on a remote machine using "CreateRemote()".  My problem is that if the
DCOM
> component is not created and the user shuts down the program using my COM
> component the COM destructor is called.  However, if the COM component
> creates the DCOM component, the COM destructor never gets called.  I have
> tried setting the DCOM pointer to nil and calling _Release but this either
> does nothing or throws an Access Violation.  Is there an equivalent
> "freeRemote()" that I should call?

> Any suggestions would be much appreciated

 

Re:Destructor not called on COM exit


Can you show the code on what happens when you say your COM component
creates the remote DCOM component?

--
have fun

Binh Ly
www.techvanguards.com

"Andrew D. Parkin" <andrewdpar...@xxx.com> wrote in message
news:3ad422a8$1_1@dnews...

Quote
> Hi,

> I have a COM component created in Delphi 5 that can create a DCOM
component
> on a remote machine using "CreateRemote()".  My problem is that if the
DCOM
> component is not created and the user shuts down the program using my COM
> component the COM destructor is called.  However, if the COM component
> creates the DCOM component, the COM destructor never gets called.  I have
> tried setting the DCOM pointer to nil and calling _Release but this either
> does nothing or throws an Access Violation.  Is there an equivalent
> "freeRemote()" that I should call?

> Any suggestions would be much appreciated

Other Threads