   Object C: Possible Memory Leak
  Ive been coding in Object C for a few weeks now, switching from C++. I made a full game and intermittently checked for mem leaks with XCodes built in leak detector. Theres a huge one but ill just show the small one first. Heres the class (Useless stuff cut out):@class ZombiePhoneWorld;@interface ZombiePhoneInputProcessor : NSObject {ZombiePhoneWorld *p_World;}-(ZombiePhoneInputProcessor*) initWithWorldRef: (ZombiePhoneWorld*) world;-(void) processInputPress: (CGPoint) pointPress;@end@implementation ZombiePhoneInputProcessor-(ZombiePhoneInputProcessor*) initWithWorldRef: (ZombiePhoneWorld*) world {self = [super init];    if ( self ) {   p_World = world;    }    return self;}-(void) processInputPress: (CGPoint) pointPress {CGPoint worldPoint = [VIZ convertPointToWorldSpace_Point: pointPress];CGRect pressRect;pressRect.origin = CGPointMake( worldPoint.x - TOUCH_LENIENCY_HALF, worldPoint.y - TOUCH_LENIENCY_HALF );pressRect.size.width = TOUCH_LENIENCY;pressRect.size.height = TOUCH_LENIENCY;[p_World collisionCheck: pressRect];}@endIm guessing the leak happens in InitWithWorldRef as there is only one leak. The object gets initialised in a world object like so:// Initialise input processorm_pInput = [[ZombiePhoneInputProcessor alloc] initWithWorldRef: self];if( m_pInput == nil ){#ifdef DEBUGNSLog(@"Failed to initialise zombie input manager.\n");#endifreturn false;}Am i just passing pointers wrong or something? It seems correct to me but this is from a C++ persective. Im not doing anything glamorous where these apparent leaks are occuring, just creating object adding to a NSMUtableArray and the odd pointer reference. Im using the NSAutoReleasePool, could that be the problem?[Edited by - Infinite_Daremo on June 25, 2009 4:00:07 AM]