Re: std::map question
From: Flzw (flownz_at_wanadoo.fr)
Date: 08/14/04
- Next message: Paul Mensonides: "Re: Boost Workshop at OOPSLA 2004"
- Previous message: Kai-Uwe Bux: "Re: std::map question"
- In reply to: Kai-Uwe Bux: "Re: std::map question"
- Next in thread: Kai-Uwe Bux: "Re: std::map question"
- Reply: Kai-Uwe Bux: "Re: std::map question"
- Reply: David Hilsee: "Re: std::map question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 14 Aug 2004 20:16:52 +0200
> It would be better not to *work around* this but to redesign the
> implementation of CObject. The way it is right now, destruction of one
> instance will invalidate all copies that exist somewhere else. This does
> not only make the use of containers impossible but is somewhat dangerous
> anyway.
True.
But I thought std containers were efficient. Here with this line, it creates
4 instances of the object and deletes three... Is it really worth it ?
I mean, I will switch to std::map <string, CObject*> from std::map <string,
CObject> and handle new / delete myself I won't need to introduce shared
pointers and it will be MUCH faster (to code and to run).
- Next message: Paul Mensonides: "Re: Boost Workshop at OOPSLA 2004"
- Previous message: Kai-Uwe Bux: "Re: std::map question"
- In reply to: Kai-Uwe Bux: "Re: std::map question"
- Next in thread: Kai-Uwe Bux: "Re: std::map question"
- Reply: Kai-Uwe Bux: "Re: std::map question"
- Reply: David Hilsee: "Re: std::map question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]