one alloc, retainCount == 2

前端 未结 5 1737
情话喂你
情话喂你 2020-12-19 20:12

I have a following code:

NSLog(@\"%d\", [chart retainCount]);

self.chart = [[BNPieChart alloc] initWithFrame:self.view.frame];
NSLog(@\"%d\", [chart retainC         


        
5条回答
  •  一生所求
    2020-12-19 20:44

    How do you know that the retainCount should be 1? Are you the author of the -setChart: method you are calling? How is it implemented? Why didn't you include it in the post?

    Nothing you have posted here is suspicious.

提交回复
热议问题