Marcos Rebelo wrote:
Some time ago I read one article about this

Consider that you have:

{               # make $a point to itself
    my $a;
    $a = \$a;
}

Or

{               # make $a and $b point to each other
    my ($a, $b);
    $a = \$b;
    $b = \$a;
}

This memory will be free just at the end of the process. This can became
a problem.

If I'm not wrong there is a subroutine that makes a reference as a weak
referenc but how?

perldoc Scalar::Util

weaken()
isweak()

--
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