Picture resource recycling method and apparatus

A picture and resource technology, applied in the field of recycling picture resources, can solve problems such as OOM, NativeCache insufficient memory, unable to control picture resource recovery, etc.

Active Publication Date: 2017-04-26
BEIJING QIHOO TECH CO LTD
View PDF8 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] Aiming at the problems existing in the prior art, the embodiment of the present invention provides a method and device for loading image resources, which are used to solve the problems in the prior art that the Android system version below version 3.0 cannot correct the image resources when loading the image resources. Recycling is controlled, resulting in insufficient memory in NativeCache, which in turn leads to OOM technical problems

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Picture resource recycling method and apparatus
  • Picture resource recycling method and apparatus
  • Picture resource recycling method and apparatus

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0080] This embodiment provides a method for loading image resources, such as figure 1 As shown, the method includes:

[0081] S101. Encapsulate the image resource recycling program into an image resource loading class.

[0082] In this step, before encapsulating the recovery program of the image resource into the image loading class, it is necessary to first encapsulate the loading program of the image background setting and the loading program of the image content display into the image resource loading class.

[0083] Wherein, the picture resource generally includes picture background setting and picture content display. When loading the picture resource, the background setting and picture content display need to be loaded, so the loading program of the picture background setting and the picture content display loading program are packaged in The picture resource loading class is in the Decode DrawableHelper, which is convenient for unified loading management.

[0084] Af...

Embodiment 2

[0144] Corresponding to Embodiment 1, this embodiment also provides a device for loading image resources, such as Figure 4 As shown, the device includes: a first encapsulation unit 41, a second encapsulation unit 42, a calling unit 43 and an establishment unit 44; wherein,

[0145] The first encapsulation unit 41 is used for encapsulating the recovery program of the picture resource into the picture resource loading class; here, before the first encapsulation unit 41 encapsulates the recovery program of the picture resource into the picture resource loading class, the The first encapsulation unit 41 first encapsulates the loading program of the picture background setting and the loading program of the picture content display into the picture resource loading class; wherein, the picture resource generally includes the picture background setting and the picture content display, when loading the picture resource, It is necessary to load the background setting and picture content...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention provides a picture resource recycling method and apparatus. The picture resource recycling method comprises the steps of packaging a picture resource recycling program to a picture resource loading catalogue; packaging a unified resource management interface for the picture resource loading catalogue; and calling the picture resource recycling program through the resource management interface according to preset recycling moment for recycling useless picture resources. Therefore, when the recycling moment is triggered in a loading process, the picture resource recycling program can be called to recycle the useless picture resources, so that it is ensured that the useless picture resources can be recycled in time, so as to release memory occupied by the useless picture resources, avoid insufficient memory of Native Cache, and further avoid an out-of-memory (OOM) problem.

Description

technical field [0001] The invention belongs to the technical field of resource loading, and in particular relates to a method and device for recovering image resources. Background technique [0002] With the continuous development of electronic products, smart terminals have basically become necessary electronic products for everyone. Current mainstream terminal (such as mobile phones, tablet computers, etc.) operating systems include: Android system and IOS system. [0003] The image loading function is a basic function that the terminal operating system needs to have. In the prior art, for versions prior to Android system version 3.0, when loading image resources, the default resource loading method of the system is usually used to load the image. The bitmap pixel data generated in the process is generally stored in the local cache NativeCache, but because the default loading method of the system is uncontrollable for the recovery of picture resources, often the picture ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/44G06F9/445
CPCG06F8/315G06F9/44521
Inventor 杨德立
Owner BEIJING QIHOO TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products