Skip navigation.
 
mlCore Data and retain count
FROM : Kimo
DATE : Sun Mar 02 21:32:43 2008

I have a Core Data app that has several entities.  One entity, Window, 
contains several properties such as openAtLaunch, windowName, and 
wController.  The wController attributes are Transformable, Optional 
and Transient.  The data are presented on a list, and when the user 
double-clicks a record, a window controller is allocated and set as 
the value for the property wController and then the window controller 
is released, giving it a retain count of 1.

However, and this is the weird part, whenever I change another 
property of the Window managed object, such as the openAtLaunch value, 
the window controller receives a 'retain'.  Even if I just edit the 
windowName property, the wController value (the window controller) 
gets another retain.  So by the time the user wants to delete a 
managed object from the list, the window controller could have a high 
value and is never released!

My question is, why would changing a property value cause another 
property to have its retain count increase?

Any insight would be appreciated.

Thanks.

Related mailsAuthorDate
mlCore Data and retain count Kimo Mar 2, 21:32
mlre: Core Data and retain count Ben Trumbull Mar 3, 02:35
mlRe: Core Data and retain count Bill Mar 3, 04:50
mlRe: Core Data and retain count Ben Trumbull Mar 4, 22:06
mlRe: Core Data and retain count Bill Mar 4, 22:46