Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^11: Detecting memory leaks.

by wrog (Friar)
on May 07, 2015 at 15:51 UTC ( [id://1126013]=note: print w/replies, xml ) Need Help??


in reply to Re^10: Detecting memory leaks.
in thread Detecting memory leaks.

You are passing in $booking_dlg to Wx::Panel::new, which is presumably creating a Wx::Panel object, which recursively refers to at least 3 other objects. If any of these other objects saves the reference to $booking_dlg, then you have a circularity of the form:
$booking_dlg->{booking_main} == Wx::Panel object, (Wx::Panel object)->{foo} == other object (other object)->{bar} = $booking_dlg
which will preserve the Wx::Panel object, the other object, and the $booking_dlg object forever unless ->{booking_main} gets reassigned sometime later. (and if $booking_dlg is simply being tossed later on, there's your leak right there)

(Update:  Well, okay, it could also be (Wx::Panel object)->{foo} = $booking_dlg directly and the other 3 objects are just being dragged along for the ride. It only takes one such reference to ruin your day...)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-16 10:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found