ion when something goes wrong. If your initialization code raises an exception, the order of doing things like shown above will make sure that the class is destroyed properly. Alter this code at your peril! The file that you can download is just a copy of the unit that declares the singleton class described in this article.
Link to file: CodeCentral entry 15083.
I''''m sure you can find a few places where a singleton class comes in handy and now you have the tools to create your own! If you want to get in touch with me, my email is lasse@cintra.no.