On Mon, 26 Jul 2004 14:52:03 +0800, rokia <ro*****@yahoo.com.cn.discuss>
wrote:
I found many people encounter this problem.
and someone say that it's STL strategy.
but I dont know when will it release those memory.
BoundCheck report there are many memory leak when I use vector to
push_back
thousands class.
any advice?
Post the code that you say is leaking memory. And specify which compiler
you are using. Then we might be able to tell you whether the leak is real
or not.
I recall that BoundsChecker reports non-existant memory leaks with the STL
that comes with VC++ 6. But equally you could have made a mistake and
BoundsChecker is reporting genuine memory leaks.
Track the number of times that constructors and destructors are called for
you class. Obviously these totals should be the same, but don't forget to
include the copy cosntructors if you do this.
john