Commits

Anonymous committed 45b3a36

add another refcounting gotcha

Comments (0)

Files changed (2)

pyobjc/Doc/warts.html

 <li>Some Cocoa classes store references to objects while not increasing the 
 reference count. One of those is NSOutlineView. A side-effect of this is that
 you <i>must</i> use subclasses of NSObject in your NSOutlineView model, and you
-<i>must</i> keep a reference to the objects you pass to NSOutlineView.</li>
+<i>must</i> keep a reference to the objects you pass to NSOutlineView.  Another
+gotcha is when you're manually allocating and assigning delegate(-like)
+objects: most of the time obj.setDelegate_() will <i>not</i> retain the delegate,
+so you must keep a reference manually.</li>
 </ul>
 </body>
 </html>
 - Some Cocoa classes store references to objects while not increasing the 
   reference count. One of those is NSOutlineView. A side-effect of this is that
   you *must* use subclasses of NSObject in your NSOutlineView model, and you
-  *must* keep a reference to the objects you pass to NSOutlineView.
+  *must* keep a reference to the objects you pass to NSOutlineView.  Another
+  gotcha is when you're manually allocating and assigning delegate(-like)
+  objects: most of the time obj.setDelegate_() will *not* retain the delegate,
+  so you must keep a reference manually.