iphone - How are objects in an autorelease pool referenced? -
I'm wondering if there are strong or weak references to those items in the autoreridge pool, I think they are weak. When I add an autorite to the auto-organ pool, it does not release immediately, but the pool is dropped, right? So the reference should be weak, i.e. the reference number (or counting) remains the same when I add an autorite to the autorevate pool?
Strong versus weak references are understood in the context of the collected waste management environment (where weaker Indicators are issued automatically and even approved even when referenced). With GC being enabled, all created / released / autoclucous calls are not essentially doing anything (although NSAteriRepiPipal -Drain method triggers garbage collection).
Now that you've tagged this question related to the iPhone, and the garbage collection on the iPhone, I'm assuming that you are referring to the regular reference count, by strengthening the number of objects you referenced to Increase, and weakens you only accumulate indicative value.
The Autorierreuse method essentially transfers the ownership of the object from the AutoRio Pool with the calling code, you can think of calling calling calling and calling the pool Are there.
The reference is effectively strong, but your code loses ownership and leaves the responsibility. If the object release will be called the AutoReisure Pool / Lower run.
Comments
Post a Comment