Re: [VOTE] Weak References

From: Date: Sat, 03 Sep 2011 17:21:49 +0000
Subject: Re: [VOTE] Weak References
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
>
> $pseudoWeakMap = array();
> $pseudoWeakMap[spl_object_**hash($obj)] = new WeakReference($obj);
>
> or did I misunderstand the concept? I hope I'll have a chance to use
> WeakReferences soon in my project;)



I also believe that this is the logic, but from the doc, when an object is
destroyed, its hash may be reused for other objects.
So this implementation could possibly have bad side effect, isn't it ?

Nicolas


Thread (69 messages)

« previous php.internals (#55160) next »