0

enter image description here

I am using Xcode Instruments Time Profiler to analyse some Objective-C code, and the statement self.tbNavigationItem.tbNavibarRightItem = nil; took a longer time than self.tbNavigationItem.tbNavibarRightItem = [[TBBarButtonItem alloc] initWithCustomView:settingBtn];, anyone can explain?

Kaiyuan Xu
  • 780
  • 7
  • 13
  • Perhaps deallocation of an existing object that was being referenced by the property? – Nicolas Miari Jul 13 '16 at 07:45
  • 1
    1) You need to profile over several hundred runs to even out the noise. 2) there may be weak references that need to be cleared. 3) you may be getting bad data due to the sampling frequency and bad luck. – Avi Jul 13 '16 at 07:45

0 Answers0