vendredi 15 juillet 2016

How to avoid setting nil for singleton static class variable

I want to avoid setting nil value by calling

[SingletonClass sharedInstance]=nil;

Because, In the next execution([SingletonClass sharedInstance]), either it will create new instance or it will be always nil if we use dispatch_once.

Aucun commentaire:

Enregistrer un commentaire