[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ms-dcom
Subject:    Re: When and how are pooled objects finally released?
From:       Russell Louks <rlouks () ESRI ! COM>
Date:       2001-07-27 15:24:01
[Download RAW message or body]


Another thing occurred to me...

The problem only became evident to me when I noticed that the components,
which each happen to hold proxies to an out of process local server, didn't
appear to be released since I could observe that these (exe servers) stuck
around after the client app terminated.  Did some more testing and found
that the destructor on the pooled components isn't ever called at all (when
pooled) at client shutdown.  With no way to shut them down on termination of
the client in Win2K, wouldn't this imply the potential for leaking some
system wide resource if such was held onto by these components?

I assume that my local servers are eventually shutting down via some DCOM
timeout due to being abandoned by their client.


-----Original Message-----
From: Steve Swartz
To: DCOM@DISCUSS.MICROSOFT.COM
Sent: 7/25/01 11:34 AM
Subject: Re: When and how are pooled objects finally released?

In Windows 2000, there's no way I know of to shut down an object pool.
There is in Windows XP and Windows .NET Server.

First you CoCreate the pool manager like this:

        Set poolMgr = CreateObject("COMSVCS.PoolMgr.1")

Then you call ShutdownPool on the object, giving it a CLSID or ProgID of
the pool you'd like to shut down:

        poolMgr.ShutdownPool "PoolObj.CounObject.1"

You can give it the empty string to shut down all the pools in the
process:

        poolMgr.ShutdownPool ""

The pools will only stay shut down until another activation comes in, at
which point they'll spin right back up again.  The IDL for the interface
is:

        // IPoolManager interface-- used to shut down an object pool
        [
          local,
          object,
          pointer_default(unique),
          uuid(0a469861-5a91-43a0-99b6-d5e179bb0631)
        ]
        interface IPoolManager: IDispatch
        {
          [id(1)] HRESULT ShutdownPool([in]BSTR CLSIDOrProgID);
        }

-----Original Message-----
From: Russell Louks [mailto:rlouks@ESRI.COM]
Sent: Monday, July 23, 2001 7:36 PM
To: DCOM@DISCUSS.MICROSOFT.COM
Subject: When and how are pooled objects finally released?


Have scoured the archives but couldn't find anything definitive...

Is there a COM+ supplied interface for dumping the pool or are
developers expected to provide their own mechanism?  It doesn't seem to
occur when all my references are released, so I assume the pool itself
must be keeping a ref.  I'd like to release all of the pooled objects
when my app terminates.

----------------------------------------------------------------
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-request@DISCUSS.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-request@DISCUSS.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-request@DISCUSS.MICROSOFT.COM

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic