From 8b236e0c66da8f92e9fc33de66cfbc8e4b0c0763 Mon Sep 17 00:00:00 2001 From: Adam Hess Date: Wed, 20 Sep 2023 09:26:31 -0700 Subject: [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 --- test/ruby/test_module.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/ruby') 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 -- cgit v1.2.3