Created
September 24, 2008 18:45
-
-
Save bkeepers/12632 to your computer and use it in GitHub Desktop.
Script that demonstrates a slight leak in Prawn's table generation code.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'prawn' | |
pid = fork do | |
loop do | |
data = [['1', '2']] * 20 | |
headers = ['a', 'b'] | |
Prawn::Document.generate("leak#{Process.pid}.pdf") do | |
table data, :headers => headers | |
end | |
GC.start | |
end | |
end | |
loop do | |
puts `ps u -p #{pid}` | |
sleep 5 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment