views:

213

answers:

2

I use an ActiveX control which is just a HTTP handler. It sends out an HTTP request, gets the response and fires an event to the user. When the user is not requesting the ActiveX control is pretty much dormant. It just waits for a user request to send another HTTP request.

As long as the window in which the OCX resides does not change (losing focus, getting focus, etc) the memory stays calm. For each of the above said operations I lose approx 400 bytes.

Where should I look for a possible leak?

A: 

Look to off-the-shelf profiling tools that may detect this leak (even debug mode in VC has an option of tracing leaked allocations).

Assaf Lavie
+1  A: 

Assuming that the HTTP string is passed down via BSTRs, you might be running into BSTR caching. To verify, you'll want to set the environment variable OANOCACHE to 1 or call OaSetNoCache() directly. The environment variable should be easier to test with.

MSN