Home > other >  Weak references and soft references in the Android application scenario.
Weak references and soft references in the Android application scenario.

Time:09-29

weak references in the Android application scenario with soft references,

CodePudding user response:

Global Map is used to store some mapping must always use a weak reference to save the object, because a global variable is generally static, its statement cycle must be longer than a single object, if preserved by a weak reference object, when the object is recycled, if you use a strong reference, object memory leak occurs,
  • Related