Chuck Remes wrote:
> On Mar 18, 2010, at 2:15 PM, William Rutiser wrote:
>
>   
>> COM has a fairly elaborate protocol for memory management responsibilities across interfaces. Its been quite a while since I have had anything to do with it, but I am pretty sure that the receiver and generator of COM data needs to explicitly free via the appropriate COM procedure.
>>     
>
> I've looked all over the Microsoft dev site at the COM documentation. I can't find anything that describes a complex memory management protocol. That isn't to say it isn't real just that I can't find it.
>
> BTW, searching through the archives I found a bug report from early 2007 that describes a similar leak.
>
> http://rubyforge.org/tracker/?func=detail&atid=1698&aid=7553&group_id=426
>
> This particular problem wasn't related to events per se, but to leaking WIN32OLE objects. I'm betting they are related.
>
> cr
>
>
>   
This should get you started:
http://en.wikipedia.org/wiki/Component_Object_Model#Reference_counting

Complex or my fairly elaborate protocol may be a little strong. MS has 
never been great about documenting important things in a way they can be 
found. COM is at the very bottom of a deep stack of MS frameworks and 
each of which seems to try to plaster over the magic in the one below. 
It seems to be assumed that everyone will buy their expensive tool that 
solves all the problems.

-- Bill

If you have a problem, and address them with a big complicated tool, you 
then have two problems.