Re: [VOTE] Weak References

From: Date: Fri, 05 Aug 2011 21:21:34 +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  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Am 05.08.2011 18:29, schrieb Hannes Landeholm:
It's interesting to think about though.
I'd definitely find a use for them;) I might just patch our installations to provide me with the zval-refcount and go with that for now...I have been warned, but I have to burn myself before I believe that boiling water is hot;) I just thought of another design-pattern which could make use of WeakReferences...The composite design pattern. http://en.wikipedia.org/wiki/Composite_pattern A parent references its childs and each child references its parent. circular-reference nightmare...with WeakReferences I could use a weakReference for storing the parent...so that if the parents last real reference is discarded the childs will cleaned out as well.

Thread (69 messages)

« previous php.internals (#54412) next »