Question

It is showing as low memory on this line/code

appDelegate.window.rootViewController = preVC;

My code: -

PreViewController *preVC = [[PreViewController alloc] initWithNibName:@"PreViewController" bundle:nil];
preVC.managedObjectContext = managedObjectContext;
[self.view removeFromSuperview]; // Memory leak .6%
appDelegate.window.rootViewController = preVC; // Memory leak 46.4%
[preVC release];

please help, correct or suggest me to release the memory or alternative solution for the problem, where I have done wrong. Thanks in Advance.

Was it helpful?

Solution

IN app delegate i didFinishLaunching u have to set your RootViewController at run time on thrugh mainWindow.Xib

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top