mergedModelFromBundles initial retain count?
Or in other words why would I need to retain the object returned b开发者_如何学Cy [NSManagedObjectModel mergedModelFromBundles]
. Is there any memory menagement rule explicitly guiding me to retain it? I assume the retain count is 0 on return.
You don't own the object returned to you because you didn't create it. If you want to keep it around (take ownership) beyond the current scope then you need to retain it. The rules are here.
精彩评论