I have a @class Foo
which contains a __weak id bar
ivar. Several actions from methods in different classes can cause the object to disappear and th
I suggest to override dealloc. If you know the type of the object that will be allocated, and it's a custom class (otherwise subclass it), you can perform the action when the object is deallocated, which is exactly what happens when ARC sets the retain count to zero and sets the weak variable to nil.