リークツールで報告された問題の原因を特定できないようです。問題のコードはここにあり、問題の行はマークされています。何か案は?どのオブジェクトがリークであるかを正確に調べる方法はありますか?問題コアのメモリリークデータコード
NSArray *getAllCoreData(NSString *entityName, NSString *orderedBy, BOOL ascending, BOOL shallow)
{
// Get the managed object context
NSManagedObjectContext *moc = [[AppController sharedAppController] managedObjectContext];
// Create a fetch request that fetches from 'entityName'
NSFetchRequest *fetch = [[NSFetchRequest alloc] init];
NSEntityDescription *entity = [NSEntityDescription entityForName:entityName inManagedObjectContext:moc];
[fetch setEntity:entity];
// Try to do the fetch
NSError *error;
NSArray *result = [moc executeFetchRequest:fetch error:&error]; <----- Problem line
[fetch release];
// Did the fetch fail?
if (!result)
{
// Display an alert view
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Fetch Failed"
message:[error localizedDescription]
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alertView autorelease];
[alertView show];
return nil;
}
// Return the array of instances of NSManagedObject
return result;
}
すべてのヘルプは非常に理解されるであろう、 ジェイソン
こんにちはjasonさん、私も同様の問題に直面していますので、この問題の解決策を投稿してください。 – ujjawal