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.FinalReleaseComObject().  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. =)

LVL 1
sfun28Asked:
Who is Participating?
 
sfun28Connect With a Mentor Author Commented:
no answer so closing out
0
 
sfun28Author Commented:
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?
0
 
sfun28Author Commented:
rpkhare or others?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.