24 bytes would be the size of the _Node type for the std::map<MapSite::Direction,MapSite *> you're using (this would be the the same size for nodes of all maps using the std traits, regardless of value_type, I believe). A new node is created everytime you invoke insert.
In the VS2003 implementation, the _Node type contains the following fields (each 4 bytes in size):
_Left
_Parent
_Right
_Myval
_Color
_Isnil
What you're seeing isn't a memory leak. The map itself will deallocate the nodes at destruction time.
Hope this helps,
-Julio.
Ray Tayek <rtayek@xxxxxxxxxxx> wrote:
sorry about the large post, used to java
At 05:39 PM 1/18/2006, you
wrote:
> > At 11:21 PM 1/17/2006, you wrote:
> > >hi, trying to code up some stuff for a class ...
> >
> > it's worse than i thought. the code below seems to also have the leak:
> > MapSite *Room::setSide(MapSite::Direction direction,MapSite *mapSite) {
> > MapSite *rc=NULL;
> > pair