1

Closed

Handle leak in AlphaVSS?

description

I am running the alphashadow sample in a loop to create 1000 snapshots. I have added a while loop around the code that creates snapshot. I am seeing that the thread count, handle count and memory (private working set) keep increasing.

At the end of 70 loops:

Memory =296 MB

Handles = 2100

Threads = 90



The process finally dies.

I am trying to understand which code is leaking so much handles / memory. Will appreciate any help...

file attachments

Closed Nov 9, 2012 at 8:48 PM by decaf

comments

decaf wrote Nov 9, 2012 at 8:48 PM

Resolved with changeset 95990: Fixed memory/handle leak in Error.cpp. (Incorrect use of CComPtr)

decaf wrote Nov 9, 2012 at 8:49 PM

Associated with changeset 95991: Merge Dev => Main
Fixed memory/handle leak in Error.cpp. (Incorrect use of CComPtr)

decaf wrote Nov 9, 2012 at 8:50 PM

Associated with changeset 95992: Merge Main => 1.1,
Fixed memory/handle leak in Error.cpp. (Incorrect use of CComPtr)

decaf wrote Nov 9, 2012 at 8:50 PM

Associated with changeset 95993: Merge Main => 1.2,
Fixed memory/handle leak in Error.cpp. (Incorrect use of CComPtr)

IEugene wrote Oct 22, 2013 at 12:06 PM

This issue is still reproducible with latest code changes (v1.2) and with current dev sources.Seams like the memory is consumed in GatherWriterMetadata() and never gets released.The attached zip contains a sample app that demonstrates this behavior.

Can you please take a look on this? I have no idea what might be the cause of this memory leak.I have the app which is running as Win Service and uses AlphaVSS. At some time it crashes with OutOfMemoryException(). The investigation led me to this discussion thread.

Thanks.