开发者

potential leak? - analyzer

开发者 https://www.devze.com 2022-12-13 15:34 出处:网络
analyze state leak p开发者_开发技巧roblem, why? + (DebugOutput *) sharedDebug { @synchronized(self)

analyze state leak p开发者_开发技巧roblem, why?

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


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

sharedDebugInstance = [[self alloc] init];
0

精彩评论

暂无评论...
验证码 换一张
取 消