From: Amit Tomar Date: 2010-09-24T17:58:17+09:00 Subject: Re: how do i force ruby to release memory Jes炭s Gabriel y Gal叩n wrote: > On Fri, Sep 24, 2010 at 10:31 AM, Amit Tomar > wrote: >>> >>> How do you know? ?How do you know that Ruby is the cause and not an >>> application code memory leak? >>> >>> Cheers >>> >>> robert >> >> Are you saying my appliaction causing memory leak.. >> or if it is so how do i tell my application to free memory.. >> is there any specific way to do it > > The Garbage Collector collects garbage, meaning objects which are not > referenced anymore. > If you are keeping references to objects, those objects will never be > garbage collected. > > In order to fix this, you have to identify which objects you think > should be garbage collected but aren't, and then checking which > references to those objects are keeping them from being freed. Then > fix the code. > > If you have a piece of code that shows the issue we might be able to > help. > > Jesus. yaa sure Jesus , this is code for download , i downloded 1.1 GB of stream and trying to download it again but i got failed to allocate memory .after that seen memory used by ruby application from task manager an my ruby application still holding memory def downlaod @stream = Stream.find(params[:id]) send_file(@stream.location,:filename => @stream.name,:disposition 'attachment',:buffer_size => 4096,:x_sendfile :true) end -- Posted via http://www.ruby-forum.com/.