The problem of Memory Leak

来源:互联网 发布:js的跨域 编辑:程序博客网 时间:2024/05/23 11:56
When I turn ARC off ,I need to manage memory manually by myself.
I have some points.


First : 
myAttribute = XXX;//This kind of writing may cause some problem of memory leak;
//So ,my way is:
self.myAttribute = XXX;


Second :
When I new a window object ,
I should rewrite "delegateClass" by "nil" in "main" function.


Third : 
The problem of Memory Leak may cause by the version of the simulator.


Last:
The good tools are "Profile" and "Analyze". 
原创粉丝点击