Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #13813
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!feeder.erje.net!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | "Gernot Frisch" <me@privacy.net> |
| Newsgroups | comp.lang.c++ |
| Subject | Re: What would happen if your destructors aren't get called? |
| Date | Tue, 7 Feb 2012 10:32:32 +0100 |
| Lines | 15 |
| Message-ID | <9pc9dhFh4pU1@mid.individual.net> (permalink) |
| References | <jghp01$ak1$1@speranza.aioe.org> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; format=flowed; charset="utf-8"; reply-type=response |
| Content-Transfer-Encoding | 7bit |
| X-Trace | individual.net zgMGNFsZMMTAar8siBh9cAlq9eKYCzVd6uStov3GvhEjfqlrQ= |
| Cancel-Lock | sha1:3DIYTvScnqtGkZKpy0UIi5InqBo= |
| In-Reply-To | <jghp01$ak1$1@speranza.aioe.org> |
| X-Priority | 3 |
| X-MSMail-Priority | Normal |
| Importance | Normal |
| X-Newsreader | Microsoft Windows Live Mail 15.4.3538.513 |
| X-MimeOLE | Produced By Microsoft MimeOLE V15.4.3538.513 |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.c++:13813 |
Show key headers only | View raw
> 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