Re: unset( $anobject) does not invoce __destruct()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ashley Sheridan wrote:

That would seem sensible to me though really. A constructor only bears
true for the base class, so any classes which inherit it must
incorporate all the constructor parts. A destructor doesn't know about
further classes which will need to inherit it, so it shouldn't be
inherited and the new class should sort things out. At least, that's how
I see it.

No, destructor can be set in abstract class. And it must if some advanced stuff done in the base classe. Like freeing ressources, closing file or database connections that is generic for classes that implements abstract stuff.

So said, the __destuct destructor isn't called, for obvious reasons explained further.

--
Mickaël Wolff aka Lupus Michaelis
http://lupusmic.org

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux