Key-Value Observing Retains Objects?

Discussion in 'Mac Programming' started by HiRez, Mar 19, 2006.

  1. HiRez macrumors 603


    Jan 6, 2004
    Western US
    Hi, it seems to me that object that I'm using Cocoa Bindings on are retaining the owner of the nib file for each one. For example, immediately after I load an object with loadNibNamed: owner:, the object I assign to owner has a retain count of 11 (!). So my guess is the KVO system is retaining the nib owner multiple times, although I can't find this in the documentation. This is making it very difficult for me to track down memory leaks because it appears the KVO system (if it is in fact the culprit) does not release the object until after the dealloc happens on the object. Therefore it's hard to tell what the "true" retain count is on the object (in other words, the retains that I have made myself). Is there some method that tells you how many retains on an object are from the KVO system?

Share This Page