Closed jsteinberg closed 10 years ago
Based off of a current leak in rubymotion(http://hipbyte.myjetbrains.com/youtrack/issue/RM-534), I have fixed a leak in the eventable module. Creating the hash of events as it was
@__events__ ||= Hash.new { |h,k| h[k] = [] }
will create a circular retain, and the object will never be deallocated. Removing the proc after Hash.new resolves the issue.
Wow, that's interesting. I'm fine with keeping this workaround long term, since it's a pretty simple refactor. Thanks!
Based off of a current leak in rubymotion(http://hipbyte.myjetbrains.com/youtrack/issue/RM-534), I have fixed a leak in the eventable module. Creating the hash of events as it was
will create a circular retain, and the object will never be deallocated. Removing the proc after Hash.new resolves the issue.