Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

HTTP::DAV circular references problem solved

by cosimo (Hermit)
on Aug 05, 2008 at 16:18 UTC ( #702405=perlnews: print w/ replies, xml ) Need Help??

Last week I wrote on use.perl about a quite big memory "leak" problem I was experiencing with HTTP::DAV.

Well, "leak" as in "big circular references" between different objects. I think I finally managed to solve it after some days of struggling, trying to write awkward destructors and other debugging pains.

It turned out the solution was simple. Just using Scalar::Util::weaken() on the "hot" back references. The problematic references were between HTTP::DAV and HTTP::DAV::Resource and between HTTP::DAV::Resource and HTTP::DAV::ResourceList.

I'm using HTTP::DAV to export hundreds of thousands of images in many different sizes to some mod_dav-enabled static servers for, well, static serving.
For this I needed the export tool to work for at least 2 days continuously, talking to 3 different servers, and all of this without problems... :-)

Now it seems to work properly! The updated CPAN version will be out soon, I hope.

Comment on HTTP::DAV circular references problem solved
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (9)
As of 2015-07-29 05:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (260 votes), past polls