Am Montag 28 Januar 2008 schrieb [EMAIL PROTECTED]:
> However, I would like to limit its use to situations where it is
> highly useful. It would be easy to get into a habit of using it
> everywhere, and I think this would create more confusion for new
> developers. The config class is a good example of somewhere we could
> use it though.

I can confirm this. Pingus once was full of shared_ptr<> and the code got very 
obfuscated by it. Extensive usage makes it very hard to track the intended 
lifetime of an object.

> > // Allways use named variable for shared_ptr that holds pointer! if not
> > using one it has danger of memory leaks because C++ doesn't define code
> > excecution order allways.

You mean C++ doesn't have sequence points at all places where you'd like to 
see them? The order is always defined, just sometimes it's defined to be 
undefined as in the compiler may change it where it's usefull.

Bye David

_______________________________________________
Wesnoth-dev mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-dev

Reply via email to