# Rake test takes too much memory, starts swapping

**URL:** <https://www.ruby-forum.com/t/rake-test-takes-too-much-memory-starts-swapping/165824>\
**Category:** Rails\
**Created:** [April 17, 2009, 10:03pm UTC](https://www.ruby-forum.com/t/rake-test-takes-too-much-memory-starts-swapping/165824 "2009-04-17T22:03:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chillexistence](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ee7513/32.png) [@chillexistence](https://www.ruby-forum.com/u/chillexistence)\
**Post date:** [April 17, 2009, 10:03pm UTC](https://www.ruby-forum.com/t/rake-test-takes-too-much-memory-starts-swapping/165824/1 "2009-04-17T22:03:33Z")

</div>

I’ve noticed with a large rails project with lots of tests, when you run  
them all the amount of memory the ruby process allocates is a lot.

It seems like every object in every test is being retained. Like the  
garbage collector thinks objects from the very first test are still  
being used even when we are on test #100 and the first test’s object can  
be released.

Is there anyway to tell rake to release objects after each test?
