Ray Tayek on Wed, 18 Jan 2006 19:30:52 -0600 (CST)


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

Re: [ALACPP] memory leak


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<map<MapSite::Direction,MapSite *>::iterator,bool> p=sides_.insert(map<MapSite::Direction,MapSite *>::value_type(direction,mapSite));
        if(!p.second)
                { rc=p.first->second; p.first->second=mapSite; }
}


anybody got a clue

thanks

---
vice-chair http://ocjug.org/

_______________________________________________
alacpp mailing list
alacpp@xxxxxxxxxxx
http://lists.ellipsis.cx/mailman/listinfo/alacpp