Im making an app that saves photos data to memory and saves the paths to core data. I am debugging it so I take photos and then delete the app if I change the code. So what happens to the paths and the data inside them every time I delete the app? Are they still there or does the os takes care of unreferenced memory allocations? Thanks in advance!
Asked
Active
Viewed 54 times
1 Answers
1
If by memory you mean saved in a directory like documents directory of the app. This directories are cleansed completely when deleting the app. Therefor sqlite (core data) is also deleated. And any unallocated memory is "released" when you kill the app from memory. Deleting an app is the easiest way to reseting it.

user2387149
- 1,219
- 16
- 28
-
The way I save it is by doing: NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; – Gabriel Apr 23 '14 at 00:28
-
does this path gets deallocated after deleting the app? – Gabriel Apr 23 '14 at 00:30
-
Yes because its in the documents directory inside the app's sandbox. The only thing I recall now that doesn't reset when deleting the app are the NSUserDefaults and the initial push notification alert (if your using any). For a certain full app reset follow this easy steps (but in your case I think deleting the app from the device is enough): http://stackoverflow.com/questions/8033216/how-to-show-would-like-to-send-you-push-notifications-alert-view-again/22234369#22234369 – user2387149 Apr 23 '14 at 23:19