When there is insufficient memory, the memory recycling mechanism comes into play. In fact, as the development language of Android, Java does not provide any operation to release memory (this is also a big difference from iOS). The system's memory recycling mechanism is used for management. Android uses a mechanism called Low Memory Killer (LMK) to manage memory. When there is insufficient memory, LMK starts to kill some with a butcher knife. The Objective-C memory recycling method of ios Objective-C is a reference counting memory recycling method. For any object generated by a class that inherits NSObject, when the object count reaches 0, dealloc will be executed on the object and recycled. Reference counting has the disadvantage that it cannot resolve circular references. Imagine that object A refers to B, and B refers to A. The counts of both objects are not zero. As a result, A and B cannot be recycled, so the memory is leaked. Therefore, Android's memory recycling mechanism is better than that of IOS.