I am a 15 year veteran of C++ and thought I could easily handle the memory issues on the iPhone. But I have been humbled by this new environment at several turns. Here is my problem. I hope I am asking the question correctly.
Basically, I am keeping a mutable array of my common object at the appdelegate. This seems like the reasonable place to maintain a collection of objects that are used by multiple different views. However, between the time I create and push the view to the nav controller and the time the view starts to use those values, the location in memory where I created my objects is getting stomped with different values.
I reviewed all of my code to make sure the reference counts were accurate but did not find anything. So I commented out ALL "release" calls to guarantee the objects still exist but the stomping still continues.
My question is this... Is there something happening that I need to be aware of when I "push" a view that could cause my memory to get stomped? I have a button the user pushes that will alloc-init a viewcontroller and then does a "pushViewController" for the containing nav controller. I verify on the subsequent line that my objects were created and I track the memory. Unfortunately the memory gets stomped as the button event unwinds to a "PurpleEventCallback".
Does this make any sense to anyone? Is there something happening to my view that is not commonly known that causes my memory to become invalid?