Method and apparatus for cleaning up resources, and device
OwnerHai HE, Rongrong ZHUinventors
Life of this patent
Estimating the term…
Abstract
The present disclosure provides a method and apparatus for cleaning up resources, a computing device, a computer-readable storage medium, and a computer program product. The method includes: when a user edits a draft, saving information of at least one object of the draft in a first set and saving a weak reference to the at least one object in a second set, where each object is linked to a corresponding resource and is reclaimable; determining an object of a resource unused in the draft by comparing the first set with the second set; and cleaning up the resource corresponding to the unused object.
Claims20
A method for cleaning up resources, comprising:
- in response to a user editing a draft, saving information of at least one object of the draft in a first set and saving a weak reference to the at least one object in a second set, wherein each object is linked to a corresponding resource and is reclaimable;
- determining an object of a resource unused in the draft by comparing the first set with the second set;
- and
- cleaning up the resource corresponding to the unused object.
A computing device, comprising:
- at least one processing unit;
- and
- at least one memory, wherein the at least one memory is coupled to the at least one processing unit, and has stored thereon instructions executable by the at least one processing unit, and the instructions, when executed by the at least one processing unit, cause the computing device to:
- in response to a user editing a draft, save information of at least one object of the draft in a first set and save a weak reference to the at least one object in a second set, wherein each object is linked to a corresponding resource and is reclaimable;
- determine an object of a resource unused in the draft by comparing the first set with the second set;
- and
- clean up the resource corresponding to the unused object.
A non-transitory computer storage medium, comprising machine-executable instructions that, when executed by a device, cause the device to:
- in response to a user editing a draft, save information of at least one object of the draft in a first set and save a weak reference to the at least one object in a second set, wherein each object is linked to a corresponding resource and is reclaimable;
- determine an object of a resource unused in the draft by comparing the first set with the second set;
- and
- clean up the resource corresponding to the unused object.
Dependencies are inferred from the claim text.