How to control allocations in Objective C ARC project iPhone sdg -
i have written code in objective c arc project working fine after running project 20-25 project crash. have tested project on xcode instrument there found no leaks in instrument have observed live bytes continually increasing. there way handle or there way remove , free allocated memory of project.
the common cause of retain cycles. retain cycles happen when have 2 objects , b hold strong references each other. definition, object won't released arc until reference count 0. therefore, can't delete unless delete b first, , can't delete b until delete a.
solve this, change 1 of strong references weak one. typically, want container class hold strong reference, , child class hold weak reference container. here examples , more detailed information:
Comments
Post a Comment