What is the correct way to destroy an object with ARC?
I would like to destroy a number of UIViewControllers as well as an object holding an AUGraph at certain times during runtime.
At the moment, when my parent viewcontroller creates viewcontroller objects and assigns their views to its view, the objects obviously stay alive with the parent. I would like to destroy these child viewcontrollers the moment they are not needed.
Just set the variables referencing those objects to
nil. The compiler will then release the objects at that moment and they will be destroyed if no other strong references to them exist.