<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Gary,<div><br></div><div>That check has been disabled for quite some time.  It was part of a larger set of checks (i.e., "missing -dealloc") that produced far too many false positives to be enabled by default.  The plan is to re-work those checks to produce far more acceptable results.</div><div><br></div><div>You are free to use these checks if you like.  To do so, see the options from 'scan-build -help':</div><div><br></div><div><div>AVAILABLE ANALYSES (multiple analyses may be specified):</div><div><br></div><div> (+) -checker-cfref                       - Run the [Core] Foundation reference count checker</div><div> (+) -warn-dead-stores                    - Warn about stores to dead variables</div><div> (+) -warn-objc-methodsigs                - Warn about Objective-C method signatures with type incompatibilities</div><div>     -warn-objc-missing-dealloc           - Warn about Objective-C classes that lack a correct implementation of -dealloc</div><div> (+) -warn-objc-unused-ivars              - Warn about private ivars that are never used</div><div><br></div><div><br></div><div>The ones with the (+) are those that are run if no specific check options are provided.  If you explicitly provide a check option, however, you must also explicitly provide the options of the other checks you want to run.  This may change in the future.</div><div><br></div><div>The option you are interested in is -warn-objc-missing-dealloc.</div></div><div><br></div><div><br></div><div><div><div>On May 17, 2009, at 11:21 AM, Gary Boone wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; "><font class="Apple-style-span" face="Helvetica"><font class="Apple-style-span" face="Monaco"><br></font></font></div><span class="Apple-tab-span" style="white-space:pre"><div></div><span class="Apple-style-span" style="white-space: normal; "><span class="Apple-tab-span" style="white-space: pre; "><div><span class="Apple-style-span" style="white-space: normal; ">It seems like the last working version I have (0.195) no longer catches release leaks. Here's how I test:</span></div><div><span class="Apple-style-span" style="white-space: normal; "><br></span></div><div><span class="Apple-style-span" style="white-space: normal; ">1. pick an synthesized instance variable, eg:</span></div><div><span class="Apple-style-span" style="white-space: normal; "><br></span></div><div><span class="Apple-style-span" style="white-space: normal; "><span class="Apple-style-span" style="color: rgb(63, 110, 116); font-family: Monaco; white-space: pre; "><span style="color: rgb(0, 0, 0); "><span class="Apple-tab-span" style="white-space: pre; ">   </span></span>GraphOverlayView<span style="color: rgb(0, 0, 0); "><span class="Apple-tab-span" style="white-space: pre; ">        </span>*</span>selectionView<span style="color: rgb(0, 0, 0); ">;</span></span></span></div><div><span class="Apple-style-span" style="white-space: normal; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; color: rgb(63, 110, 116); "><span style="color: rgb(170, 13, 145); "><span class="Apple-tab-span" style="white-space: pre; ">  </span></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; color: rgb(63, 110, 116); "><span style="color: rgb(170, 13, 145); "><span class="Apple-tab-span" style="white-space: pre; ">      </span>@property</span><span style="color: rgb(0, 0, 0); "> (</span><span style="color: rgb(170, 13, 145); ">nonatomic</span><span style="color: rgb(0, 0, 0); ">, </span><span style="color: rgb(170, 13, 145); ">retain</span><span style="color: rgb(0, 0, 0); ">)<span class="Apple-tab-span" style="white-space: pre; ">   </span></span>GraphOverlayView<span style="color: rgb(0, 0, 0); "><span class="Apple-tab-span" style="white-space: pre; ">        </span>*</span>selectionView<span style="color: rgb(0, 0, 0); ">;</span></div><div><font class="Apple-style-span" face="Monaco"><br></font></div></span></div><div><span class="Apple-style-span" style="white-space: normal; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; "><span style="color: rgb(170, 13, 145); "><span class="Apple-tab-span" style="white-space: pre; ">        </span>@synthesize</span><span class="Apple-tab-span" style="white-space: pre; "> </span>selectionView;</div><div><font class="Apple-style-span" face="Monaco"><br></font></div></span></div><div><span class="Apple-style-span" style="white-space: normal; ">In this object's dealloc, comment out the variable's release:</span></div><div><span class="Apple-style-span" style="white-space: normal; "><br></span></div><div><span class="Apple-style-span" style="white-space: normal; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; "><span class="Apple-tab-span" style="white-space: pre; ">   </span>- (<span style="color: rgb(170, 13, 145); ">void</span>)dealloc {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; color: rgb(46, 13, 110); "><span class="Apple-style-span" style="color: rgb(0, 116, 0); "><span class="Apple-tab-span" style="white-space: pre; ">     </span>//<span class="Apple-tab-span" style="white-space: pre; ">       </span>[selectionView release];</span></div><div><span class="Apple-style-span" style="color: rgb(0, 116, 0); font-family: Monaco; "><span class="Apple-tab-span" style="white-space: pre; ">       </span></span>}</div></span></div></span></span><div><span class="Apple-style-span" style="white-space: normal;"><br></span></div><div><span class="Apple-style-span" style="white-space: normal; ">2. If I build with an old version:<span class="Apple-tab-span" style="white-space:pre"></span></span></div><div><span class="Apple-style-span" style="white-space: normal; "><span class="Apple-tab-span" style="white-space:pre">        </span>xcodebuild clean; ~/development/checker-0.147/scan-build -k -V xcodebuild</span></div></span><div apple-content-edited="true"> <div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>the missing release is detected:</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>missing ivar release (leak)</div><div><br></div><div>3. But if I build with a recent version (0.195)</div><div><div><span class="Apple-tab-span" style="white-space:pre">        </span>xcodebuild clean; ~/development/checker-0.195/scan-build -k -V xcodebuild</div><div><br></div><div>nothing is noted; there's no output that includes the missing release.</div><div><br></div></div><div><br class="Apple-interchange-newline">Thanks,</div><div>Gary</div><div><br></div></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline"> </div><br></div>_______________________________________________<br>cfe-dev mailing list<br><a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br></blockquote></div><br></div></body></html>