On 12/9/05, Alan Pinstein <[EMAIL PROTECTED]> wrote: > However, my question, which still remains unanswered, is that I've > found a way that "seems" to create a weak reference and I'm simply > asking if what I am doing is condoned or just lucky (and thus a bad > idea that will probably break in the future)...
The general rule of thumb is that if what you're doing makes you feel dirty inside, or feels wrong, or that it might not work in the future, then you shouldn't rely on it working that way. I'm not saying that this hack is or is not planned to go away, but there is a real possibility that it might go away as the side-effect of some other change. So, if it works for you, that's fine... but if you're writing something that you want to be used successfully with future PHP versions, then you should avoid using it. > And, if it's just lucky, then what is the solution to the problem? Am > I just SOL? Is the answer simply that if you *need* to create > circular references in PHP, then you *must* accept memory leakage? While I love the idea of writing everything in PHP, if you find yourself up against a limitation that you can't avoid without nasty hacks, then perhaps PHP is the wrong tool for that particular job. --Wez. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php