|
Posted by Oli Filth on 02/24/06 03:15
Tony Marston said the following on 23/02/2006 23:49:
> PHP is not C++, so expecting the same behaviour from two different languages
> is just being too optimistic.
I'm not; I was just disputing the assertion that an object is a
collection of code and variables.
> It is not wise to delete an object while you
> are still inside it, nor is it wise to overwrite it with something else
> while you are still inside it. Why? Because it buggers up any references to
> the original object which may still exist in other places.
In most situations, yes. But the whole point of having an object delete
itself (in OO languages in general) is in situations where there are
intentionally no external pointers/references to it. In PHP, I can't
see how such a situation could exist, though.
The point is moot, however, because the language doesn't allow it...
--
Oli
Navigation:
[Reply to this message]
|