Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: Hunting a memory eater

by oiskuu (Friar)
on Feb 27, 2014 at 17:26 UTC ( #1076423=note: print w/ replies, xml ) Need Help??

in reply to Hunting a memory eater

Why do you create a separate resolver object for each query?

Comment on Re: Hunting a memory eater
Replies are listed 'Best First'.
Re^2: Hunting a memory eater
by McA (Priest) on Feb 27, 2014 at 18:13 UTC


    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.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1076423]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (3)
As of 2015-11-27 03:36 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (717 votes), past polls