You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This one fixes a serious problem we faced in production under a heavy
load. Investigation led us to the fact that it happens only when params
are defined with `type: Array[SomeClass]`. In this case `Virtus`
dynamically create some virtual classes (with `Class.new`) which
inherits from base class with `DescendantsTracker` added which saves
descendant classes into the array. Here we have a leak because garbage collector
doesn't free these classes because an array still holds a reference to
them.
So at least I can say that `Virtus` isn't designed for creating things
*dynamically*. They should be stored somehow statically.
0 commit comments