sfun28
asked on
Clean unmanaged memory from .net
Hi Experts - Lets say I have .net code that makes a bunch of COM calls, and sometimes I fail to call Marshal.FinalReleaseComObj ect(). Over time I get a memory leak. Is there a way to search (unmanaged?) memory and release these COM objects? Or do I have to release the object just as soon as I'm done with it? I'm trying to cleanup after the fact. =)
ASKER
Hi rpkhare - these resources don't quite help. Let me restate my question: I'm looking for a way to enumerate through all of the Runtime Callable Wrappers that my app has created.
for example my code may get the following RCW, but never release the object
dim abc as SomeCOMObject = ComObj.GetAnotherComObject
I'd like a way, in some other thread or object, to enumerate the various live RCWs and free them. is that possible?
for example my code may get the following RCW, but never release the object
dim abc as SomeCOMObject = ComObj.GetAnotherComObject
I'd like a way, in some other thread or object, to enumerate the various live RCWs and free them. is that possible?
ASKER
rpkhare or others?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://blogs.msdn.com/jonathanswift/archive/2006/10/16/net-interop-freeing-unmanaged-memory.aspx
https://www.experts-exchange.com/questions/20871263/Free-unmanaged-memory-from-C.html