text: Q:
  
  ATL COM server lifetime
  
  i have an out of process COM server written with the help of ATL. Under normal circumstances the lifetime of that server is conveniently handled for you however if a client process dies prior to releasing its interface the server seems to linger around forever.
  Is there a way (or a timeout that i don't know about) that allows the server to enter its shutdown procedure when no clients are connected. Or i guess another way to put it is how does ATL/COM handle the ref count for clients that crash?
  
  A:
  
  There is a timeout to dereference stubs in your COM server in a few minutes, so it should not take forever. However, another problem you might be having is that as a part of operation COM objects in your server have cross references which are not properly released with this sudden death of connected client. In this case, your COM object will keep locks on the server process and prevent it from auto-termination which you expect to happen.
  
  