Re: C++ static destructor guaranteed to be called?
- From: "E.J. Pitt" <esmond.not.pitt@xxxxxxxxxxxxxxx>
- Date: Sat, 08 Oct 2005 10:48:35 GMT
Paul J. Lucas wrote:
If I'm writing some native code using the C++ JNI API and my C++ code has a static object with a destructor, is it guaranteed that said destructor will be called before the process terminates (as it would be if this were plain C++)?
I would think the answer would be "yes" since this is outside the purview of the JVM.
This behaviour is mandated by the C++ standard. The only platform I am aware of where it doesn't happen according to specification is Novell Netware when you have a C++ NLM that terminates abnormally, and that information is some years old.
.
- Follow-Ups:
- Re: C++ static destructor guaranteed to be called?
- From: Mark Thornton
- Re: C++ static destructor guaranteed to be called?
- Prev by Date: Re: Binomial Simulation
- Next by Date: JNDI url problem
- Previous by thread: Re: C++ static destructor guaranteed to be called?
- Next by thread: Re: C++ static destructor guaranteed to be called?
- Index(es):
Relevant Pages
|