What is "viewController" ? Are you sure there is always a viewController.view properly set when you call the method ? If you call removeFromSuperview on an object that has been released, it'll crash.
Is "gameViewController" retained in your setGameViewController method ? It must be retained or you'll crash later, because you released the "gameview" variable. If it is a property, use the retain keyword next to its declaration. If you implemented it, manually retain the new value, release the old one, THEN assign it to your variable.
|