Memory leak on NSPredicate that used in fetch request to fetch NSManagedObject
问题 According to the instrument I have memory leak on the NSPredicate. How can I avoid this memory leak? what went wrong? The code as the following: Note : Default Manager is Singleton self.editingContext is a child context that has a parent context (main context) The output of this function (JobType) is NSManagedObject that use in the parent NSManagedObject (e.g job.type = jobType) func defaultJobType() -> JobType? { let fetchRequest = NSFetchRequest(entityName: JobType.entityName()); let