On Tuesday 06 January 2004 6:09 pm, Randal L. Schwartz wrote:
> >>>>> "Gary" == Gary Stainburn <[EMAIL PROTECTED]> writes:
>
> Gary> My idea is to keep only the %_BLOCKS as a strong ref and weaken
> Gary> all others.  That way, I can guarantee that when I delete that
> Gary> ref the object will be destroyed.
>
> I do believe you want it the other way around.

Hi Randal,

I've read the column you mentioned in a previous post, and I see what you mean 
with the above statement.

However, I believe what I am right for the effects I want.

my %_BLOCKS is the equivelent of your %REGISTRY, and when a block gets created 
I add it to %_BLOCKS.  However, I want that block to remain after the block 
that created it has finished - hence keeping it as a strong ref. (think init 
function which reads track definition from file then exits)

I also want to be confident that when I want to delete the block the object is 
actually deleted, hence weakening ALL other references to it.

However, as I said in a response to Rob, provided I don't do sloppy coding the 
problem should never arise anyway.
-- 
Gary Stainburn
 
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000     


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to