Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Object::InsideOut leaks memory when using threads::shared

by menth0l (Monk)
on Oct 13, 2010 at 15:49 UTC ( #865106=note: print w/ replies, xml ) Need Help??


in reply to Re: Object::InsideOut leaks memory when using threads::shared
in thread Object::InsideOut leaks memory when using threads::shared

Yeah, i've sent him an e-mail but i got no answer yet. Since i've a deadline ahead i try to find answer in other sources...

Maybe someone had the same problem as me? Or can someone at lest try to run this code and say whether it leaks on his/her machine? I would be very gratefull.


Comment on Re^2: Object::InsideOut leaks memory when using threads::shared
Re^3: Object::InsideOut leaks memory when using threads::shared
by BrowserUk (Pope) on Oct 13, 2010 at 16:18 UTC
    Or can someone at lest try to run this code and say whether it leaks on his/her machine? I would be very gratefull.

    I confirm that your test code leaks at a rate of about 1.5MB/s here (I've printed out the versions I have):

    #! perl -slw { package Test; use Object::InsideOut; my @dummy :Field; } package main; use threads; use threads::shared; print $]; print $threads::VERSION; print $threads::shared::VERSION; print $Object::InsideOut::VERSION; while (1) { my $o = new Test; } __END__ c:\test>junk66 5.010001 1.76 1.33 3.69

    You'll see I've tried swapping things around a bit to see if it made any difference (having read the following in the O::IO docs:

    If you receive an error similar to this: ERROR: Attempt to DESTROY object ID 1 of class Foo twice

    the cause may be that some module used by your application is doing require threads somewhere in the background. DBI is one such module. The workaround is to add use threads; at the start of your application.

    The only thing that prevented the leak was to comment out use threads::shared as you've already discovered.

    I took a (brief) look inside, but that requires a PhD in O'Woe, and I failed my masters in that subject :)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (14)
As of 2014-07-30 17:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (237 votes), past polls