User Tools

Site Tools


ios-labs-s14:advanced-singleton

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Last revision Both sides next revision
ios-labs-s14:advanced-singleton [2014/02/24 13:07]
mbarboi created
ios-labs-s14:advanced-singleton [2014/02/24 13:07]
mbarboi
Line 28: Line 28:
 </​code>​ </​code>​
  
-//​dispatch_once//​ is a C method part of GCD (Grand Central Dispatch), a method of coordinating and synchronizing threads. The contents of the block will only be called once.+//​dispatch_once//​ is a C method part of GCD (Grand Central Dispatch), a method of coordinating and synchronizing threads. The contents of the block will only be called once. The instance is stored in the static variable //​recorder//​ and is returned at the end of every accessor call
  
 Example invocation of singleton accessor, returning singleton: Example invocation of singleton accessor, returning singleton:
ios-labs-s14/advanced-singleton.txt ยท Last modified: 2014/02/24 13:10 by mbarboi