ashfurrow / C-41

C-41 is an application to help people develop film at home by providing a series of "recipes" for photographers to use.
MIT License
2.05k stars 368 forks source link

ASHTimerViewModel中的nstimer会有内存泄露吧 #26

Open rogerjinHub opened 8 years ago

ashfurrow commented 8 years ago

You're see a memory leak with the NSTimer? Where, specifically?

rogerjinHub commented 8 years ago

on ASHTimerViewModel file , you can write the dealloc function, and when the ASHTimerViewController pop, the dealloc function cannot be called, so it's memory leak, right?

  1. so on the ASHTimerViewController file , you can add [viewmodel pause] on cancel function, this will call the dealloc function when controller dismiss.
rogerjinHub commented 8 years ago

you can start the time, don't to pause the time, and then pop the controller

ashfurrow commented 8 years ago

Ah, interesting. Good catch, I'll try to get to that.

zppsteav commented 8 years ago

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'CoreData: FATAL ERROR: The persistent cache of section information does not match the current configuration. You have illegally mutated the NSFetchedResultsController's fetch request, its predicate, or its sort descriptor without either disabling caching or using +deleteCacheWithName:'

cxjwin commented 7 years ago

NSTimer will retain self.