I recently read the memory management of knowledge I would like to ask why should we spend the autorelease retain and release ah
All objects are more convenient
autoreleaseSeeking advice
Reply:
autorelese is convenient, but in terms of efficiency and manage their own discrepancy.
Reply:
autorelese efficiency is not much problem.
At what point in the end just autorelese to us releasing the object, this object is everyone who does not know if he can manage to understand memory, why use this automatic way of doing things?
If you are not using good produce autorelese find it very troublesome bug.
Reply:
Counter to manage object lifetime
For example, you create an object A, and the use of autorelese, if no other object reference variables A, the system will automatically destroy the object A
However, if not used autorelese, the object A forever memory resources
Reply:
retain and release is IOS content management foundation.
autorealse also built on the foundations.
Another: different situations may have different needs, did not say which method can solve everything.
Reply:
Memory management. . csdn forum actually does not support editing.
Reply:
autorealse as the delayed release of the object, and you do not know when to release it, is not conducive to management and performance, autorealse used for the return value.
Reply:
That is very accurate, we can not determine when used for the release, when appropriate, other times less.
No comments:
Post a Comment