From: Walton Hoops Date: 2010-09-25T14:20:32+09:00 Subject: Re: how do i force ruby to release memory On 9/24/2010 10:41 PM, Amit Tomar wrote: > > but Ryan how do i force it to release memory??? You don't. You remove the reference by setting @stream=nil, and the Garbage Collector will release the memory when it gets around to it. Note there are no guarantees about when the GC will run, or what it will free when it does, so it's not like you will see the memory drop immediately when you set @stream to nil, in fact it's very likely that it won't get run until the interpreter tries to allocate the next chunk of memory for the next 1G object.