Array processing method and device, electronic equipment and storage medium

An array processing and sparse array technology, applied in the computer field, can solve problems such as memory leaks

Inactive Publication Date: 2019-05-10
KINGSOFT
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] Embodiments of the present invention provide an array processing method, device, electronic equipment, and storage medium, which are used to solve the problem that values ​​of sparse arrays are stored in a strong reference manner, which may easily cause memory leaks

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
  • Array processing method and device, electronic equipment and storage medium
  • Array processing method and device, electronic equipment and storage medium
  • Array processing method and device, electronic equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0048] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

[0049] The terms "first", "second" and "third" in the specification, claims and drawings of the present invention are used to distinguish different objects, rather than to describe a specific order. Furthermore, the terms "include" and "have", as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps...

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 embodiment of the invention provides an array processing method and device, electronic equipment and a storage medium, which are used for solving the problem that the value of a sparse array is stored in a strong reference manner, so that memory leakage is easily caused. The method comprises the following steps: if a target user interface component of a target application is started, adding atarget data unit corresponding to the target user interface component into a first sparse array of the target application; if the target user interface component is ended, executing a garbage collection operation; and if the first sparse array comprises the target data unit, performing weak reference processing on the first sparse array to obtain a second sparse array. By implementing the embodiment of the invention, memory leakage can be avoided.

Description

technical field [0001] The invention relates to the field of computers, in particular to an array processing method, device, electronic equipment and storage medium. Background technique [0002] The data type of sparse array (SparseArray) is often used in current Android development to store key-value pairs (key-value), where the key is stored in an integer int array, and the value is stored in In an Object array. And the value value is stored in an Object array in the form of strong reference, which increases the risk of potential memory leaks. Contents of the invention [0003] Embodiments of the present invention provide an array processing method, device, electronic equipment, and storage medium, which are used to solve the problem that values ​​of sparse arrays are stored in a strong reference manner, which may easily cause memory leaks. [0004] The first aspect of the embodiments of the present invention provides an array processing method, including: [0005] I...

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): G06F16/22
Inventor 廖彦文
Owner KINGSOFT
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