开发者

mergedModelFromBundles initial retain count?

开发者 https://www.devze.com 2023-01-05 13:51 出处:网络
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?

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消