Eruby stuff with big arrays balloons apache memory use, and usage never gets let go

Say, I’ve got an analysis application using eruby on an internal site,
and it doesn’t need to be perfect, but it is using a lot of memory, and
then it never lets it go. It’s got some multi-dimensional arrays of
gobs of related classes, and I want to do it this way because all the
relationships are clear. It should just run, and then the memory should
get let go when I leave the routine:

def x
gro =
markup = gro.domymainbit
return markup

but the memory eaten up in gro object never gets released apparently.
Can someone suggest a method to make sure gro, or apache lets all this
memory loose?

Xeno C. wrote:

I guess I should add that I created all this code, I have control over
it, and it seems there must be something with the instantiation set that
is staying in memory, when I am presuming it will be garbage collected.
I am not using a memory preservation tool like mod_ruby, at least not
consciously, and I just checked and neither mod_ruby nor fastcgi are
listed by yum. I do have mod_perl in there. I may not be able to take
that out, as it is for somebody else’s stuff.