Hacker News new | ask | show | jobs
by lukeredpath 5390 days ago
I'm no fan of singletons either, but writing one with GCD dispatch_once is pretty simple. Nevertheless, I do have a macro for it:

http://lukeredpath.co.uk/blog/a-note-on-objective-c-singleto...

It's really for creating "shared" instances rather than true singletons, but who honestly needs a real singleton?

1 comments

This is cool!