update : 2015.11.03
php.shukuma.com검색:
|
소개Weak references provide a non-intrusive gateway to ephemeral objects. Unlike normal (strong) references, weak references do not prevent the garbage collector from freeing that object. For this reason, an object may be destroyed even though a weak reference to that object still exists. In such conditions, the weak reference seamlessly becomes invalid.
Example #1 Weakref usage example
<?php 위 예제의 출력: Object still exists! object(MyClass)#1 (0) { } Destroying object! Object is dead! |