[CDBI] C::DBI Memory usage

Perrin Harkins perrin at elem.com
Wed May 24 17:43:27 BST 2006


On Wed, 2006-05-24 at 17:03 +0100, Aaron Trevena wrote:
> I thought the memory was reclaimed when the variable goes out of scope.

No, not unless you undef it.  See perlfaq3:
http://perldoc.perl.org/perlfaq3.html#How-can-I-free-an-array-or-hash-so-my-program-shrinks%3f

You will also find tons of advice about this on Perlmonks, like this
thread:
http://perlmonks.org/?node_id=312203

> > If that's true, Devel::Size will help you find it.  Or try
> > Devel::Size::Report and look for anything over a certain size.
> 
> Yes, I've tryed these but get totally overwhelmed by the reporting.

Try parsing the output to ignore the small ones.

- Perrin




More information about the ClassDBI mailing list