This post originated from an RSS feed registered with Ruby Buzz
by Obie Fernandez.
Original Post: Big JRuby Memleak Fixed
Feed Title: Obie On Rails (Has It Been 9 Years Already?)
Feed URL: http://jroller.com/obie/feed/entries/rss
Feed Description: Obie Fernandez talks about life as a technologist, mostly as ramblings about software development and consulting. Nowadays it's pretty much all about Ruby and Ruby on Rails.
...the big problem. Since there's only a single DynamicScope
stack, all DynamicScope instances created (even the scopes created for a
new method call in a new frame) always held a reference to a previous
DynamicScope. In the case of a method call's top-level scope, it
referenced the *previous frame's* DynamicScope. This caused any closures
created in that method's lifespan to hold references to *every single
scope in the call stack up to that point*. Ouchie. Couple that with
stuffing those Proc instances into ObjectSpace for finalization, and
you've got a mega leak...essentially leaking every reference in every
frame leading up to that Proc.
So, what happens once all these big problems get ironed out? Damn...