Leser: 2
|< 1 2 3 4 >| | 32 Einträge, 4 Seiten |
[E|B,02.07.2004, 18:54]@Dieter
Nur ruhig, er wollte doch nur wissen, WIE es geht. War doch keine böse Absicht! :)
QuoteIch nicht wissen - aber er schreibt stets so als wäre ich sein Lieblingsfeind.
# Yes it uses Perl, you non-believer :-).
1
2
3
4
5
--------------------------
| |
--> A -> B -> C -> D -> E --
1 <- <- <- <- |
---------------------
A -> B -> C -> D -> E
Quoteweaken REF
REF will be turned into a weak reference. This means that it will
not hold a reference count on the object it references. Also when
the reference count on that object reaches zero, REF will be set to
undef.
This is useful for keeping copies of references , but you don't want
to prevent the object being DESTROY-ed at its usual time.
{
my $var;
$ref = \$var;
weaken($ref); # Make $ref a weak reference
}
# $ref is now undef
Quoteisweak EXPR
If EXPR is a scalar which is a weak reference the result is true.
$ref = \$foo;
$weak = isweak($ref); # false
weaken($ref);
$weak = isweak($ref); # true
|< 1 2 3 4 >| | 32 Einträge, 4 Seiten |