Re: reference
| From: | Andrei Zmievski | Date: | Fri, 11 May 2001 13:10:40 +0000 |
| Subject: | Re: reference | ||
| References: | 1 2 | Groups: | php.gtk |
| Request: | Send a blank email to php-gtk+get-1806@lists.php.net to get a copy of this message | ||
On Fri, 11 May 2001, Roel Vanhout wrote:
> Without the reference, an instance of the object will be made, and a
> copy of this object will be assigned to $window. With the reference,
> only one instance will be made. So, the version with the reference is
> more memory efficient.
Not just that, but if you do several assignments in a row, you will
experience problem with objects changing their type and all that. Just
use &new except for when assigning to global variables inside functions.
-Andrei
"You choose to do the bad things in your life;
the good ones come and drag you along with them."
- Michael Marshall Smith