Re: Live_Objects behavior depends on garbage collection timing

[prev] [thread] [next] [Date index for 2004/07/12]

From: Siamak Pazirandeh
Subject: Re: Live_Objects behavior depends on garbage collection timing
Date: 16:49 on 12 Jul 2004
I tried :
if (1) {
    do {
        if (my $hh=WH::DBI::Whitehat::html->retrieve(25189)) {
            $hh->html;
            1;
        }
        1;
    };
print STDERR WH::DBI::Whitehat->dump_object_index();
}

and still got the object leakage.

Max

On Sat, Jul 10, 2004 at 10:56:13AM -0400, Drew Taylor wrote:
> 
> Siamak Pazirandeh said:
> >
> > Sorry about not clarifying, but the card object remains "Live" even if I
> > don't keep a local var pointed to it, and even if I return "1" from the
> > block. That's why I suspect has_a as the culprit.
> >
> > Here is a revised version of example 4:
> >
> > -----------
> > do {
> > 	Class::DBI::card->retrieve(25189);
> > 	if (my $hh=Class::DBI::html->retrieve(25189)) {
> > 	$hh->html;
> > 	}
> > 	1;
> 
> What happens if you add a "1;" after $hh->html? The if clause is a block,
> so the solution would seem to be the same as for curing #1 you previously
> posted. I think adding the extra op before ending the block should do the
> trick.
> 
> Drew
> -- 
> ---------------------------------------------------------
> Drew Taylor          *  Web app development & consulting
> drew@xxxxxxxxxx.xxx  *  Site implementation & hosting
> www.drewtaylor.com   *  perl/mod_perl/DBI/mysql/postgres
> ---------------------------------------------------------

(message missing)

Re: Live_Objects behavior depends on garbage collection timing
Siamak Pazirandeh 16:49 on 12 Jul 2004

Generated at 11:35 on 01 Dec 2004 by mariachi v0.52