Re: [RFC][Vote] Typed Properties
| From: | Rowan Collins | Date: | Thu, 26 May 2016 21:36:15 +0000 |
| Subject: | Re: [RFC][Vote] Typed Properties | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-93590@lists.php.net to get a copy of this message | ||
On 26/05/2016 22:24, Lester Caine wrote:
So every time I update the current tree because the client has selected a different initial root I have to destroy perhaps 30 person objects and rebuild the whole lot again from scratch?In a word, yes: if you have a different set of data, use a different set of objects to hold it. Objects are not memory slots to be re-filled, they represent a specific instance of a thing. Creating and destroying 30 objects on a modern system is the work of nanoseconds, and not something to be avoided at all costs. Regards, -- Rowan Collins [IMSoP]