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
If you run this script you'll see the number of methods on AV::Base increase. We use the object id to calculate a method name, so the leak isn't exactly linear as some object ids will get recycled:
This commit adds a finalizer just to inline templates. We can't cache
compilation of inline templates because it's possible that people could
have render calls that look like this:
```ruby
loop do
render inline: "#{rand}"
end
```
and we would cache every one of these different inline templates. That
would cause a memory leak. OTOH, we don't need finalizers on regular
templates because we can cache, control, and detect changes to the
template source.
Fixes: #35372
I don't have a fix for this yet, but inline templates definitely leak memory.
Here is a test:
If you run this script you'll see the number of methods on
AV::Base
increase. We use the object id to calculate a method name, so the leak isn't exactly linear as some object ids will get recycled:The text was updated successfully, but these errors were encountered: