in reply to Re: Re: Memory leak when using hash 'references'
in thread Memory leak when using hash 'references'

services like ftp, apache and mysql could consume a system within hours

Don't each of those re-exec themselves every time a request is made to them to stop that from happening? The way I understand it, an incoming request uses the existing server, and a second, new server process is forked off to await the next request. That initial process is then free to exit once the request is complete, releasing any resources it was holding. Admittedly, my OS knowledge is fairly basic (stuff from Uni, and from my own personal interest), but I'm sure I've read that somewhere *grins*.

the above program gives back the memory to the system, and top shows no abnormal memory usage

Gives memory back to the system how? Can you provide some specifics (numeric data as to what's going on, including the name of the field you're looking at in top?) A loop wouldn't (necessarily) use a large amount of memory in its own right; it'd be interesting to get a better idea of what's going on.

-- Foxcub
A friend is someone who can see straight through you, yet still enjoy the view. (Anon)