diff options
author | Adam Hess <[email protected]> | 2023-09-20 09:26:31 -0700 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2023-09-22 09:44:58 -0400 |
commit | 8b236e0c66da8f92e9fc33de66cfbc8e4b0c0763 (patch) | |
tree | 8154d0859136c1a4e5fa51a4267f448f3c1fab32 /test/ruby/test_module.rb | |
parent | f59b488b5a7f6e46e3e6d80d2b0a269e7d937a30 (diff) |
[Bug #19896]
fix memory leak in vm_method
This introduces a unified reference_count to clarify who is referencing a method.
This also allows us to treat the refinement method as the def owner since it counts itself as a reference
Co-authored-by: Peter Zhu <[email protected]>
Diffstat (limited to 'test/ruby/test_module.rb')
-rw-r--r-- | test/ruby/test_module.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb index cc22e2a77c..7aebf71d2d 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -3293,7 +3293,7 @@ class TestModule < Test::Unit::TestCase end def test_complemented_method_entry_memory_leak - # [Bug #19894] + # [Bug #19894] [Bug #19896] assert_no_memory_leak([], <<~PREP, <<~CODE, rss: true) code = proc do $c = Class.new do @@ -3317,7 +3317,7 @@ class TestModule < Test::Unit::TestCase end 1_000.times(&code) PREP - 100_000.times(&code) + 300_000.times(&code) CODE end |