Closed peterzhu2118 closed 6 months ago
If an exception is raised the FBuffer is leaked.
For example, the following script leaks memory:
o = Object.new def o.to_json(a) = raise 10.times do 100_000.times do begin JSON(o) rescue end end puts `ps -o rss= -p #{$$}` end
Before:
31824 35696 40240 44304 47424 50944 54000 58384 62416 65296
After:
24416 24640 24640 24736 24736 24736 24736 24736 24736 24736
If an exception is raised the FBuffer is leaked.
For example, the following script leaks memory:
Before:
After: