The idea was to use this as a fail safe in case you lost the reference to
your instance.

Singleton does not prevent you to have two or more instances existing at
the same time cause this is standard behavior for OOP. What it does is
making sure that it avoid unintentional creation of instances.

Maybe I did not make myself clear but my intention was to create multiple
instances of ChronosManager , NOT prevent this.

On Sun, Feb 5, 2017 at 2:33 AM Cyril Ferlicot D. <[email protected]>
wrote:

> Le 05/02/2017 à 01:08, Dimitris Chloupis a écrit :
> > The initial intention was to not make it a singleton to allow for
> > multiple instances of timers. Hence why it's wiped out. But making it a
> > singleton is something Phil asked for too, I just forgot to turn it into
> > a singleton. I will update it tomorrow. I use only a single instance
> > myself as well too.
> >
>
> If that's your intention why not keeping a "default" one and let the
> user create new ones by hand?
>
> Singleton is to prevent two objects to exist at the same time and if I
> understood correctly there is nothing preventing to get two timer.
>
> :)
>
> --
> Cyril Ferlicot
>
> http://www.synectique.eu
>
> 2 rue Jacques Prévert 01,
> 59650 Villeneuve d'ascq France
>
>

Reply via email to