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,