pingus-devel
[Top][All Lists]
Advanced

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

Re: How to continue


From: David Philippi
Subject: Re: How to continue
Date: Tue, 11 Jun 2002 14:58:25 +0200
User-agent: KMail/1.4.1

On Tuesday 11 June 2002 13:51, Ingo Ruhnke wrote:
> At a few places its just used as an auto_ptr<>
> (shared_ptr<MultiplayerClientChield>). In a few other places its

Why didn't you use auto_ptr<> in the first place? Most people knowing C++ 
will know what an auto_ptr<> is, but who many know a boost::shared_ptr<>?

> simply missplaced. For example the whole shared_ptr<Controller> stuff,
> but as I want to get rid of the current Controller concept I haven't
> yet changed that. The shared_ptr<WorldObj> stuff is a little bit more

Since I can't read your mind, I've got to ask again. What's wrong with the 
currenct Controller concept (whatever it might be) and what's your idea how 
it should be.

> difficult, since one needs to keep track of all the stuff that is
> placed into the world, collecting them in a seperate std::vector<> and
> deleteing them at level destruction might be the way to go. Something
> similar might be needed in the Editor.

Let's see if I got this right - every object in the world is in some 
shared_ptr<> and if noone references it anymore, it's getting deleted. The 
better alternative would be to place every object beeing created in a 
std::list (why pay the performance penalty of std::vector?) gaining the 
advantage that there's one place to find every object and to delete any of 
them at level end. 

Bye David




reply via email to

[Prev in Thread] Current Thread [Next in Thread]