but, as I've understood, it is required to mark as "weak" every reference to the object?
No, the typical use would be to have only %already_created_objects contain weak references. Then normal object life-time control would take place and when an object is no longer referenced other than in %already_created_objects, that object would be destroyed and the value in %already_created_objects would transform into undef.
If there is some reason you want to destroy the object while there are still live references to it besides %already_created_objects, then you should give more information to justify that unusual requirement.
- tye
In reply to Re^2: How to explicitly destroy an object so that all other references to it would become false? (just 1)
by tye
in thread How to explicitly destroy an object so that all other references to it would become false?
by bdimych
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |