Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #13813
| From | "Gernot Frisch" <me@privacy.net> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: What would happen if your destructors aren't get called? |
| Date | 2012-02-07 10:32 +0100 |
| Message-ID | <9pc9dhFh4pU1@mid.individual.net> (permalink) |
| References | <jghp01$ak1$1@speranza.aioe.org> |
> in my case the destructor of a globally used class isn't called
I had lots of problems with global objects, because their c'tors are called
even before the CRT was initialized and so on. Also, the memory leak tools
usually don't get them right.
So, I switched from using global objects to somehting like:
object& global_object()
{
static object o;
return o;
}
Back to comp.lang.c++ | Previous | Next — Previous in thread | Find similar | Unroll thread
What would happen if your destructors aren't get called? "U.Mutlu" <for-usenet@mutluit.com> - 2012-02-04 00:01 +0100
Re: What would happen if your destructors aren't get called? Ian Collins <ian-news@hotmail.com> - 2012-02-04 12:05 +1300
Re: What would happen if your destructors aren't get called? "U.Mutlu" <for-usenet@mutluit.com> - 2012-02-04 00:23 +0100
Re: What would happen if your destructors aren't get called? Ian Collins <ian-news@hotmail.com> - 2012-02-04 13:18 +1300
Re: What would happen if your destructors aren't get called? "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2012-02-04 15:43 +0100
Re: What would happen if your destructors aren't get called? "MikeWhy" <boat042-nospam@yahoo.com> - 2012-02-04 14:19 -0600
Re: What would happen if your destructors aren't get called? Ian Collins <ian-news@hotmail.com> - 2012-02-05 09:37 +1300
Re: What would happen if your destructors aren't get called? Goran <goran.pusic@gmail.com> - 2012-02-03 22:03 -0800
Re: What would happen if your destructors aren't get called? Joshua Maurice <joshuamaurice@gmail.com> - 2012-02-03 15:11 -0800
Re: What would happen if your destructors aren't get called? Ian Collins <ian-news@hotmail.com> - 2012-02-07 17:19 +1300
Re: What would happen if your destructors aren't get called? Sam <sam@email-scan.com> - 2012-02-03 17:28 -0600
Re: What would happen if your destructors aren't get called? Paavo Helde <myfirstname@osa.pri.ee> - 2012-02-03 18:22 -0600
Re: What would happen if your destructors aren't get called? "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2012-02-04 15:46 +0100
Re: What would happen if your destructors aren't get called? "Gernot Frisch" <me@privacy.net> - 2012-02-07 10:32 +0100
csiph-web