Stan Kaufman
2007-Dec-14 02:41 UTC
Calling GC.start with attachment_fu and RMagick -- where or if?
RMagick (and ImageMagick) have been criticized for memory leaks, though the problem is avoidable by timely garbage collection -- see this thread: http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/edee971625603f82/e402fb95de40d54b Attachment_fu does not call GC.start in any fashion that I can see, so my questions are these: does it need to, and if so, where would be the optimal place? It appears that AttachmentFu::Processors::RmagickProcessor#with_image may be the right method -- perhaps in the ensure clause? Somewhere else? Or should GC.start be called in one''s app at, say, the end of the controller create method that uses attachment_fu -- instead of mucking about with attachment-fu''s lower-level plumbing? Or does attachment_fu handle the needed garbage collection in some other way so it''s good to go as is? In a development environment app, the attachment_fu/RMagick stack is working great, but I''d like to understand whether I need to do something more before moving to production. Many thanks in advance for any pointers! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---