objective c - How can this Xcode Clang static analyzer warning be suppressed? -


"potential leak of object allocated on line n , stored 'variable'."

normally helpful analyzer warning, there few situations annoying false positives suppress keep analyzer results clean. in analyzer's defense, it's noticing memory leak not release in path of execution (to blind).

i'll elaborate on situation. happens in various flavors, general pattern follows:

  1. an object allocated , delegate set.
  2. something done object. (a task started, view displayed, etc).
  3. execution of current method ends. (enter clang warning).
  4. object decides task complete, sends delegate message.
  5. delegate releases object.

this not @ esoteric design pattern, i'm hoping suppression possible. know can avoided storing offending object in ivar later released, prefer not add ivar pollution.

clang has few new source annotations. in specific, may interested in ns_consumed attribute.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -