OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Phil Reynolds (preynoldsRIDGEWAYSYSTEMS.COM)
Date: Mon Nov 26 2001 - 09:21:24 CST

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    COM always calls Release() on the server object when the client calls
    Release() for the last time. It does not cache the last Release() in the
    same way it caches the rest of them.

    If the client goes away without calling Release() the Server will only get
    Releas()ed when the garbage collector detects the client has gone i.e. 6
    minutes after the client process has gone.

    COM+/MTS's object pooling undoubtedly changes this behaviour.

    > -----Original Message-----
    > From: Steve Haeck [mailto:steve.haeckBOM.CO.UK]
    > Sent: 26 November 2001 15:04
    > To: DCOMDISCUSS.MICROSOFT.COM
    > Subject: [DCOM] Object lifetime...
    >
    >
    > A (relatively) simple question... I hope. I've a COM object
    > derived from
    > IUnkown on my server and at least one client is connected...
    > The instances
    > are created by the client with CoCreateInstanceEx() in the
    > obvious way.
    > When I've finished with the object I use delete on the client
    > side object.
    >
    > What is the state of the server at the instance that
    > execution resumes in
    > the client after I've deleted my object derived from
    > Iunknown? If there is
    > code in the destructor which alters the state of the server (freeing
    > critical user-oriented resources) - can I be certain that that my
    > destructor on the server side will have been called before
    > any other COM
    > method on the server immediately after delete has returned in
    > my client, or
    > can I only be sure that my server object will be destroyed (calling my
    > precious destructor) sometime soon?
    >
    > Thanks in advance...
    > Steve
    >
    > ----------------------------------------------------------------
    > Users Guide http://discuss.microsoft.com/archives/mailfaq.asp
    > contains important info. Save time, search the archives at
    > http://discuss.microsoft.com/archives/index.html .
    > To unsubscribe, mailto:DCOM-signoff-requestDISCUSS.MICROSOFT.COM
    >

    ----------------------------------------------------------------
    Users Guide http://discuss.microsoft.com/archives/mailfaq.asp
    contains important info. Save time, search the archives at
    http://discuss.microsoft.com/archives/index.html .
    To unsubscribe, mailto:DCOM-signoff-requestDISCUSS.MICROSOFT.COM