Objective-c – potential leak? – analyzer

ciphoneobjective c

analyze state leak problem, why?

+ (DebugOutput *) sharedDebug
    {
      @synchronized(self)
      {
        if (sharedDebugInstance == nil)
        {
          [[self alloc] init];
        }  
      }
      return sharedDebugInstance;
    }

Best Answer

Well sharedDebugInstance is not assigned, you probably wanted to do that:

sharedDebugInstance = [[self alloc] init];
Related Topic