Article View: borland.public.cppbuilder.nativeapi
Article #16009Re: log off/ application terminate
From: Ed Mulroy [TeamB]
Date: Wed, 04 Jun 2003 02:41
Date: Wed, 04 Jun 2003 02:41
27 lines
2573 bytes
2573 bytes
No, I am not suggesting that the function passed to atexit delete a class. I am suggesting that it NOT do anything with classes or any other allocated items. There is no guarantee of in what state the item that would be deleted would be. I wanted it to alter some data item in a way that disables the watchdog or at least renders its activities harmless. You might put in a static bool member variable and declare the function as a friend and the function set or clear its value to disable the watchdog. Do not confuse atexit with code that runs normally. It is called very late in the program shutdown. It is not a vehicle for deleting class instances. . Ed "Duane Hebert" <spoo@flarn.com> wrote in message news:3edd47ba@newsgroups.borland.com... > > > Thanks Ed. The watchdog is handled by a class that is > instantiated in the ctor of the main form and deleted in > it's dtor. The dtor of the watchdog, kills the watchdog. > If I understand you correctly, you're suggesting to > write a function to delete the watchdog object and call > this function in atexit(). I will try that in the morning > though I'm not sure about atexit() when there is no logoff. > In that case, it works fine. If I delete several objects in > the main form's dtor and then call atexit() can I be sure > that the other deletes will succeed?
Technical Details
Message-ID:
<3edd5c7b@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!petbe.visi.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3edccd80@newsgroups.borland.com> <3edcd422$1@newsgroups.borland.com> <3edcdbb6@newsgroups.borland.com> <3edcea6f$1@newsgroups.borland.com> <3edcf095$3@newsgroups.borland.com> <3edd3cdd@newsgroups.borland.com> <3edd47ba@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,f4b8abe1a2fab575 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-06-03 19:46:57 PST From: "Ed Mulroy [TeamB]" <ed@mulroyREMOVETHESECHARS.org> Newsgroups: borland.public.cppbuilder.nativeapi References: <3edccd80@newsgroups.borland.com> <3edcd422$1@newsgroups.borland.com> <3edcdbb6@newsgroups.borland.com> <3edcea6f$1@newsgroups.borland.com> <3edcf095$3@newsgroups.borland.com> <3edd3cdd@newsgroups.borland.com> <3edd47ba@newsgroups.borland.com> Subject: Re: log off/ application terminate Date: Tue, 3 Jun 2003 22:41:42 -0400 Lines: 29 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 206.228.162.48 Message-ID: <3edd5c7b@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1054694523 206.228.162.48 (3 Jun 2003 19:42:03 -0700) X-Authenticated-User: edmulroy Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!petbe.visi.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail