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.
Results (410 votes),