From: brabuhr@... Date: 2010-01-13T07:05:56+09:00 Subject: Re: [Q] WIN32OLE memory leaks On Tue, Jan 12, 2010 at 4:19 PM, Chuck Remes wrote: > In my ruby code I am making a call out to a COM object that is returning an > array of objects. I extract some information from these objects and then > request a new batch to do the same work all over again. > > Even though I am clearing the received array out, my program slowly leaks > memory until it hits its limit (around 1.4 GB on Windows) and dies. > > I have tried adding my_object.ole_free calls everywhere, but that has not > helped at all. I've looked through the archives (back to 2004) and saw that > this was a common issue years ago. I had hoped it would be fixed by now. > > Does anyone have any suggestions on how to force these unused objects to get > GC'ed? This program needs to run a long time so a memory leak is absolutely > fatal. Some code might be helpful (and maybe a reference to the old article that you think is the same issue?) (but, I don't have a Windows box to test it on for you anyways) Would it be possible to run each batch in a new ruby process?