Re: iword and sword problem
Bo Persson wrote:
"Erik" <erik.griessmann@fmc-ag.com> skrev i meddelandet
news:1154496683.625736.118250@b28g2000cwb.googlegroups.com...
I used the static ios_base functions iword and sword in a
DLL-Library-Code to implement a manipulator. My Visual C++ 8
compiler
always complains about a memory leak, when the program is
terminated.
Is this a compiler specific problem?
Could be.
The leak detector is run at the end of main(), well before
global objects are destroyed.
That depends on the leak detector. Note, too, that cin, cout
and cerr are never destructed. If he has used his manipulator
on one of these, the memory it causes to be allocated will never
be freed. Some leak detectors might complain here, too,
regardless of how late they run. (It depends on the
sophistication of the leak detector; a good leak detector will
recognize that there are still pointers to the memory in static
objects, and only warn that there might be a leak.)
--
James Kanze GABI Software
Conseils en informatique orient?e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S?mard, 78210 St.-Cyr-l'?cole, France, +33 (0)1 30 23 00 34
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]