Skip to content

Instantly share code, notes, and snippets.

@biilmann
Created August 25, 2010 19:44
Show Gist options
  • Save biilmann/550139 to your computer and use it in GitHub Desktop.
Save biilmann/550139 to your computer and use it in GitHub Desktop.
require ::File.expand_path('../../../config/environment', __FILE__)
# No memory leak
loop do
Mkt::Task.all.each do |t|
puts t
end
end
require ::File.expand_path('../../../config/environment', __FILE__)
# No memory leak
task = Mkt::Task.first
loop do
task.send(:try_completion)
end
require ::File.expand_path('../../../config/environment', __FILE__)
# Memory leak!
loop do
Mkt::Task.all.each do |task|
task.send(:try_completion)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment