Re: [Wormux-dev] Singleton and design patterns

2008-02-01 Par sujet kurosu
Quoting Matthieu Fertr� <[EMAIL PROTECTED]>: > I'm back to point the different potential race conditions that can > appear with the proposed implementation (current implementation is also > sensible to race conditions). Indeed, I didn't try to address the threading problems. > Here are some typic

Re: [Wormux-dev] Singleton and design patterns

2008-02-01 Par sujet Matthieu Fertré
Matthieu Fertré a écrit : > Kurosu a écrit : > >> Kurosu a écrit : >> >> >>> As the ml tends to strip even patches, you can find a mirror of the >>> patch here: >>> http://kurosu.free.fr/wormux/singleton.diff >>> > In my mind, you can apply it, it's far better that what we have > c

Re: [Wormux-dev] Singleton and design patterns

2008-02-01 Par sujet Matthieu Fertré
Kurosu a écrit : > Kurosu a écrit : > >> As the ml tends to strip even patches, you can find a mirror of the >> patch here: >> http://kurosu.free.fr/wormux/singleton.diff >> > > gentildemon, drayan? I'd really like your feedback before applying what > I consider such a broadly-scoped patch.

Re: [Wormux-dev] Singleton and design patterns

2008-02-01 Par sujet Matthieu Fertré
Kurosu a écrit : > Kurosu a écrit : > >> As the ml tends to strip even patches, you can find a mirror of the >> patch here: >> http://kurosu.free.fr/wormux/singleton.diff >> > > gentildemon, drayan? I'd really like your feedback before applying what > I consider such a broadly-scoped patch.

Re: [Wormux-dev] Singleton and design patterns

2008-01-31 Par sujet Kurosu
Kurosu a écrit : > As the ml tends to strip even patches, you can find a mirror of the > patch here: > http://kurosu.free.fr/wormux/singleton.diff gentildemon, drayan? I'd really like your feedback before applying what I consider such a broadly-scoped patch. Best regards, -- Kurosu

Re: [Wormux-dev] Singleton and design patterns

2008-01-28 Par sujet Kurosu
As the ml tends to strip even patches, you can find a mirror of the patch here: http://kurosu.free.fr/wormux/singleton.diff Kurosu a écrit : > For 1), I think there should maybe be a factory or whatever, holding a > list of all the created instances, and providing some method to destroy > all inst

Re: [Wormux-dev] Singleton and design patterns

2008-01-28 Par sujet Kurosu
Hi, Julien Puydt a écrit : > Kurosu a écrit : >> This one seems rather nice (at least it confirms my belief it should be >> a template): >> http://www.gamedev.net/reference/programming/features/enginuity2/page5.asp > > I'm not convinced the author wrote and maintained that much C++ code : I have

Re: [Wormux-dev] Singleton and design patterns

2008-01-28 Par sujet Kurosu
Hi, Julien PUYDT a écrit : >>> I've been introducing a CleanUp() static method in those I found, so as >>> to delete the singleton of the considered class. This has so far removed >>> about 1MB of leaks on program exit, but a big number of them remains. [...] > There's another way : a master objec

Re: [Wormux-dev] Singleton and design patterns

2008-01-28 Par sujet Kurosu
Hi, Eddy Petrișor a écrit : > Doing that would mean to do a half assed job. If we rely on the > famework to do the job for us, we'll end up not using the CleanUp > function at all. That would only be in "release mode", where we prefer avoiding any potential bug in the class destructors than expos

Re: [Wormux-dev] Singleton and design patterns

2008-01-28 Par sujet Eddy Petrișor
On 27/01/2008, Kurosu <[EMAIL PROTECTED]> wrote: > Kurosu a écrit : > > I've been introducing a CleanUp() static method in those I found, so as > > to delete the singleton of the considered class. This has so far removed > > about 1MB of leaks on program exit, but a big number of them remains. > >

Re: [Wormux-dev] Singleton and design patterns

2008-01-27 Par sujet Julien Puydt
Kurosu a écrit : > This one seems rather nice (at least it confirms my belief it should be > a template): > http://www.gamedev.net/reference/programming/features/enginuity2/page5.asp I'm not convinced the author wrote and maintained that much C++ code : - the functors are pretty primitive : what

Re: [Wormux-dev] Singleton and design patterns

2008-01-27 Par sujet Julien PUYDT
Kurosu a écrit : > Kurosu a écrit : >> I've been introducing a CleanUp() static method in those I found, so as >> to delete the singleton of the considered class. This has so far removed >> about 1MB of leaks on program exit, but a big number of them remains. > > As a side note, forcing object des

Re: [Wormux-dev] Singleton and design patterns

2008-01-26 Par sujet Kurosu
Kurosu a écrit : > I've been introducing a CleanUp() static method in those I found, so as > to delete the singleton of the considered class. This has so far removed > about 1MB of leaks on program exit, but a big number of them remains. As a side note, forcing object destruction underlined some c