Overview of app
My RVC has an object of custom type 'Entry' that has various values (AssetURL, Notes for item). I pass an instance of this to two viewControllers in order to add information about the Entry into this instance for saving. I do this successfully, but am unsure about how I should be creating / destroying my objects. If I try to use the myEntry object a second time around I get a bad access error. I assume this is something simple I have overlooked in my self-taughtedness.
RootViewController myEntry;
RootViewController
-- Click + (Add) button
-- Create instance of AssetPickerController
-- Set instance entry to that of my RVC Entry so as to set values of the RVC Entry in the AssetPickerController (AssetPickerController.assetEntry = myEntry;)
-- Load AssetPickerController
AssetPickerController
-- Select asset from generated table of assets
-- update assetEntry.URL (this flows back to the RVC myEntry instance)
--> RootViewController - didPickURlNotification
-- Load AssetDetailsController
-- AssetDetailsController.assetDetailsEntry = myEntry (to get values passed back to RVC)
AssetDetailsController --> Enter some notes in a field, save the to entry (this flows back to the RVC)
-->Push save Button
--> RootViewController - didCreateEntryNotification
--> Save and write to Data model to store Entry
This all works - once! As soon as I try and reset any variables to perform the operation again I get bad access errors!
Can someone please point out the n00b mistake I'm clearly making!? I hope my pseudo code is enough for you to assist.