help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom new/delete and STL


From: starkos
Subject: Re: Custom new/delete and STL
Date: 6 Sep 2005 06:19:24 -0700
User-agent: G2/0.2

Matthias Doerfel wrote:
> The STL container itself needs also to manage its internal data
> with the memory manager. For this one uses the concept of an
> "STL Allocator". Google for "stlallocator" or see Stroustrup, C++,
> chapter 19.4 Allocators (german edition at least)

I was hoping to avoid this approach, since it would require me to
modify the existing library source code to force all of the STL objects
(there are a lot of them) to use my custom allocator.


> new() and delete() should always match, but what you see is
> perhaps the management data of the list itself.

That would make sense. Unfortunately this memory is not returned, even
if the list itself goes out of scope. So it is really management data
for STL, not for the particular list.

Thanks for the response,
Jason



reply via email to

[Prev in Thread] Current Thread [Next in Thread]