in reply to Re^9: Detecting memory leaks.
in thread Detecting memory leaks.
Hi Anon,
So using your narrow review method, the following (ie one function using a hash object)
my $count1 = Devel::Leak::NoteSV(my $handle); $booking_dlg->{booking_main} = Wx::Panel->new($booking_dlg +, wxID_ANY, wxDefaultPosition,[$gl_cfg->{monitor_resolution_x}, $gl_c +fg->{monitor_resolution_y}], wxNO_BORDER, "" ); my $count2 = Devel::Leak::CheckSV($handle ); print "Count1 = '",$count1,"'\n"; print "Count2 = '",$count2,"'\n"; print "Diff = '",$count2-$count1,"'\n";
Gives me:
new 0x9d741e8 : new 0x9d56f70 : new 0x9d44858 : new 0x9d38270 : new 0x9d382d0 : old (1): 0 Count1 = '594970' Count2 = '594974' Diff = '4'
Maybe I'm using the wrong mental model, but I don't really see how this could be, unless there are new objects being created by Wx::Panel, which are then referred to by references in $booking_dlg->{booking_main} and therefore not dropping out of scope.
What do you think?
Regards
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^11: Detecting memory leaks.
by wrog (Friar) on May 07, 2015 at 15:51 UTC | |
|
Re^11: Detecting memory leaks.
by Anonymous Monk on May 08, 2015 at 03:00 UTC | |
by Steve_BZ (Chaplain) on May 11, 2015 at 16:09 UTC | |
by Anonymous Monk on May 13, 2015 at 07:19 UTC | |
by Anonymous Monk on May 13, 2015 at 07:54 UTC | |
by Steve_BZ (Chaplain) on May 14, 2015 at 19:57 UTC | |
by Anonymous Monk on May 14, 2015 at 23:23 UTC | |
by Steve_BZ (Chaplain) on May 09, 2015 at 20:16 UTC |