Static access to ICore
Andreas Pakulat
apaku at gmx.de
Fri Nov 16 21:11:05 UTC 2007
On 16.11.07 21:03:43, Esben Mose Hansen wrote:
> On Friday 16 November 2007 19:35:06 Andreas Pakulat wrote:
>
> > Huh? Ok, the constructor check would help if one could directly create
> > an ICore object, but the destructor check doesn't help with anything, if
> > instance != it gets set to 0, if it already is 0, well nothing happens
> > in the end.
>
> Well, as I presume that only one instance is ever created, that check is
> almost free and would catch the rather fatal bug if it was created twice.
> Likewise with the destructor: While unlikely, the check is nearly free (could
> be an assert, even) and is a nice sanity check. I admit I might be too
> paranoid there. Blame my IT career ;)
Hehe, I just added the assert to the constructor, indeed that check is
quite cheap and doesn't really hurt.
Andreas
--
You have Egyptian flu: you're going to be a mummy.
More information about the KDevelop-devel
mailing list