From: Luis Lavena Date: 2010-01-13T07:10:07+09:00 Subject: Re: WIN32OLE memory leaks On Jan 12, 6: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. Please include exact and complete version of Ruby you're using (ruby - v) and under which Windows flavor. Also, if this can be reproducible with any COM object, include a sample script for us to reproduce in other Windows version and Ruby version combinations. Once we have that and we can confirm, I'll recommend submitting a bug report to Ruby own bug tracking system: http://redmine.ruby-lang.org/ There select the proper version and report the issue. -- Luis Lavena