DCOM Server - Memory keeps growing
I have a DCOM executable which is a server program written in C++. The client is a VB program which calls the methods from DCOM. When the first client makes the call to DCOM, the DCOM executable is started on the server side and its initial memory size is 20,000K. The memory keeps growing when ever any client calls a DCOM method. In C++ code, I call QueryInterface(...), AddRef() and I release pointer to Interface by calling Release(..), but the memory still keeps growing for every call to DCOM method.
Why is this?
When each client disconnect from DCOM server, the memory on server side is not release, but only when the last client disconnects, the DCOM executable is stopped which is fine.
How can I keep the memory on server side not grow when clients are making calls to DCOM interface?