Hey!

I am writing a logging class which writes all the data that are to be logged in a buffer and when the destructor is called the buffer is cleared and written to some data storage.

So I wanted to know whether I can rely on the destructor to be called.

In my tests I just figured out that it won't get called if the script ends with a fatal error or something comparable. Otherwise it's always invoked.

So just to ensure that I haven't forgotten something? Is there any other situation where it's not invoked?

Cheers,
Jay

--
Sun Certified Programmer for the Java 2 Platform, Standard Edition 5.0
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to