Quote:
Originally Posted by BrianSlick
The view controller stuff is not relevant. You need to post more about locArray. How is it declared in the .h file? And you need to post more about foundLocations. Use your head and provide useful code if you want a solution.
|
-locArray is a NSMutableArray declared in app-delegate;
-foundLocations is a NSMutableArray initialized with data from a remote database and it is declared as a property in the current view controller;
The app I am working makes use of maps. I let the user search locations and the results I put first in foundLocations and then in locArray (which sits in app - delegate as I mentioned before). Now everythings work fine after I retained locArray (it was just a guess), but I want to understand what is going on with that property which is initialized in app-did-launch. Why it works when the first search is performed and why I need retain it in order to be able to use it the next time I search.