Ray Tayek on Thu, 19 Jan 2006 01:37:45 -0600 (CST) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [ALACPP] memory leak |
At 05:58 PM 1/18/2006, you wrote:
I believe that you only delete the pointer to the MapSite, not the MapSite object, that is what you leaked memory! sizeof(MapSite)=24.
my sizeof MaptSite is 4. the mapsite's are deleted by Maze::~Maze. none of my objects are 24 bytes on the wclipse cdt with g++.
thanks
Ray Tayek <rtayek@xxxxxxxxxxx> wrote: hi, trying to code up some stuff for a ... MapSite *Room::setSide(MapSite::Direction direction,MapSite *mapSite) { map::iterator i=sides_.find(direction); MapSite *rc=NULL; if(i!=sides_.end()) { rc=i->second; sides_.erase(i); } sides_.insert(map*>::value_type(direction,mapSite)); return rc; } ...
--- vice-chair http://ocjug.org/ _______________________________________________ alacpp mailing list alacpp@xxxxxxxxxxx http://lists.ellipsis.cx/mailman/listinfo/alacpp