in reply to
Hunting a memory eater
Why do you create a separate resolver object for each query?
I don't do it this way in my code. But a cpan module, I'm using is using Net::DNS in more or less this way. While searching for the culprit I could reduce it to the snippet shown by me.
So, you're absolutly right that someone should instantiate one resolver object and then use this resolver for 1..n lookups.
In terms of memory usage I would expect that all memory gets freed when the reference to the object gets out of scope.
A Programming Language, 1962
Programming the 1900 series in COBOL, 1974
Algorithms + Data Structures = Programs, 1976
The C Programming Language, 1978
System V - Interface definition, 1986
Z80 Assembly Language Programming, 1979
TheSOURCE User's Manual, 1979
The C Primer, 1983
Interactive Fortran 77, A Hands on Approach, 1984
Perl.1 man page, 1991
Results (353 votes),