diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_settracefunc.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb index 88488aef5c..c6955467c4 100644 --- a/test/ruby/test_settracefunc.rb +++ b/test/ruby/test_settracefunc.rb @@ -564,6 +564,16 @@ class TestSetTraceFunc < Test::Unit::TestCase } end + # Bug #18264 + def test_tracpoint_memory_leak + assert_no_memory_leak([], <<-PREP, <<-CODE, rss: true) +code = proc { TracePoint.new(:line) { } } +1_000.times(&code) +PREP +1_000_000.times(&code) +CODE + end + def trace_by_set_trace_func events = [] trace = nil |