Re: Live_Objects behavior depends on garbage collection timing

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

From: Drew Taylor
Subject: Re: Live_Objects behavior depends on garbage collection timing
Date: 14:56 on 10 Jul 2004
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
Drew Taylor 14:56 on 10 Jul 2004

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