in reply to Memory Leak
Perl uses reference counting to free memory appropriately. So usually things work and you don't get memory leaks. However if you create circular references (eg A refers to B refers to C refers to A), it is up to you to manually break the circle so that they can all get freed.