WIN32OLE memory leaks

On Mar 24, 2010, at 3:09 PM, Chuck R. wrote:

I have continued to chase this problem down. I think I may have a lead, but I need someone familiar with the win32ole.c code to confirm or deny my suspicions.

I have pastied the invoke method here: gist:342716 · GitHub

Take a look around line 118 of the pastie. This code is making copies OR references to each parameter before invoking the event sink callback.

After the block is invoked, I think at least one of the code paths does NOT call VariantClear() on the passed parameters (see line 215). Won’t that lead to a memory leak for these parameters?

Could this be the leak that has been plaguing me?

I should have noted that the code snippet comes from ruby 1.9.1 p-376.

cr