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).
--
Stanislav Malyshev, Zend Software Architect
[EMAIL PROTECTED]   http://www.zend.com/
(408)253-8829   MSN: [EMAIL PROTECTED]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to