1. The callback for the asynchronous network request updates the UI, but does not determine whether the interface exists and causes the null pointer to CRASH2. Memory leaks caused by callback in handler 3. Static objects save a memory leak caused by an activity reference when 4.Handler is inside a class that is not a static inner class, the default is to save a reference to the external class, which results in a memory leak in the 5.handler postdelayed update u I, but it is possible that the interface is not the current interface at execution time, which also results in null pointer crash6. There is no default empty constructor in fragment that causes Crash7. Intra-Process inter-module communication, using broadcasts for understanding coupling, but not using localbroadcastmanager to cause security and performance issues 8. Non-reusable objects, such as:
- Use new message without message.obtain;
- Adapter is not reused in the GetView;
- Rewrite the OnDraw of view to create the Paint object in OnDraw;
9. Register the callback interface, but forget to log off, a class to save the callback interface, if you forget to log out, it will lead to memory leaks, In particular, activity-related 10.Bitmap processing, such as the GridView loading pictures, using LRUCache and DiskCache cache images, bitmap size is not calculated to use, wasting memory is also easy to cause oom11.timer not used, be sure to cancel Timer to prevent the timer from leaking 12. Exception handling, do not capture exception for large pieces of code, but to deal with specific exceptions in order to improve the robustness of the program 13. Use of the container class can be referred to the Android recommended container; When the number of elements is determined, specifying the container size avoids resize
From for notes (Wiz)
Andobert box test found problem classification does not involve business logic