Below is the code to remove VC from the navigation stack.
NSMutableArray *navigationArray = [[NSMutableArray alloc] initWithArray: self.navigationController.viewControllers];
// [navigationArray removeAllObjects]; // This is just for remove all view controller from navigation stack.
[navigationArray removeObjectAtIndex: 2]; // You can pass your index here
self.navigationController.viewControllers = navigationArray;
[navigationArray release];
However note, by doing this you will have problem to go to previous VC as you are removng the previous VC from the stack.
As you are complaining about memory, I would say DOUBLE CHECK code once again and investigate where memory is getting used more. Incase if that object is not needed, release that object so that memory issue would not be there.