Skip to content

kraag22/ios-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

ios-examples

Some examples of iOS code

zombies

Example how to create zombie object and let application crash on accessing it. There are 2 viewControllers. In scViewController we create 2 objects - holder and zombie. Holder only stores zombie object. After that we switch to second controller with holder object.
Now let's try to change line 15 in scHolder.h (@property (assign, nonatomic) scZombie *zombie;)

  • @property (strong, nonatomic) scZombie *zombie; - everything is OK. Zombie speaks
  • @property (weak, nonatomic) scZombie *zombie; Zombie is allready deallocated, but weak pointer nills it. So speak does nothing
  • @property (assign, nonatomic) scZombie *zombie; Zombie is deallocated and aplication crashes. See the diference with nszombieenabled on/off

About

Some examples of iOS code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published