Hello Stanislav, Friday, June 20, 2008, 7:44:10 PM, you wrote:
> Hi! >> As one of the Haskell list denizens commented, is there a potential for >> memory >> leakage if lambdas implicitly import $this when defined within an object > Not really leakage (if refcounts done right) but lifetimes extending > beyond what is expected - i.e. if some instance of closure generated by > the object is alive then the object is alive. If that's an issue, it can > be improved by storing $this only for closures that actually use it > (those messing with $$var will be in trouble). Your point being? You describe nothing new here. Just admit the fact once again that refcounted variables are a) hard to implement correct and b) never work 100% what you want. A GC simply isnt an artifical intelligence that knows wht you would like it to do when reference counting gets more complex. We know this arelready and we live with this in PHP for a long time. And it is never a real problem in the domain we focus on. That being short living scripts that serve internet requests. Best regards, Marcus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php