diff --git a/src/Core/GameController.m b/src/Core/GameController.m index e2442a3c..481d2a11 100644 --- a/src/Core/GameController.m +++ b/src/Core/GameController.m @@ -617,8 +617,7 @@ static NSComparisonResult CompareDisplayModes(id arg1, id arg2, void *context) // Create an NSOpenGLContext with the FullScreen pixel format. By specifying the non-FullScreen context as our "shareContext", we automatically inherit all of the textures, display lists, and other OpenGL objects it has defined. fullScreenContext = [[NSOpenGLContext alloc] initWithFormat:pixelFormat shareContext:[gameView openGLContext]]; - [pixelFormat release]; - pixelFormat = nil; + DESTROY(pixelFormat); if (fullScreenContext == nil) { diff --git a/src/Core/Universe.m b/src/Core/Universe.m index 107b6b0e..d4c991d7 100644 --- a/src/Core/Universe.m +++ b/src/Core/Universe.m @@ -944,15 +944,14 @@ static OOComparisonResult comparePrice(id dict1, id dict2, void * context); if (![a_station isStation] || ![a_station validForAddToUniverse]) { OOLog(@"universe.setup.badStation", @"Could not create built-in Coriolis station! Generating a stationless system."); - [a_station release]; - a_station = nil; + DESTROY(a_station); } } } if (a_station != nil) { - [a_station setOrientation: q_station]; + [a_station setOrientation:q_station]; [a_station setPosition: stationPos]; [a_station setPitch: 0.0]; [a_station setScanClass: CLASS_STATION];