Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Java object reference method, Java object reference devices and medium

An object invocation and object technology, applied in the computer field, can solve the problems of program crash, strong reference cannot be automatically released, occupying a large amount of memory, etc., and achieve the effect of avoiding program crash.

Inactive Publication Date: 2018-04-13
TENCENT TECH (SHENZHEN) CO LTD
View PDF5 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The embodiment of the present invention provides a Java object reference method, device and medium to solve the problem of program crash caused by excessive memory occupation caused by strong references that cannot be automatically released

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
  • Java object reference method, Java object reference devices and medium
  • Java object reference method, Java object reference devices and medium
  • Java object reference method, Java object reference devices and medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0043] In order to solve the problem of program crash caused by the inability to release memory due to the strong reference relationship between two variable objects, the embodiment of the present invention provides a Java object reference method, device and medium.

[0044] The preferred embodiments of the present invention will be described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described here are only used to illustrate and explain the present invention, and are not intended to limit the present invention, and in the absence of conflict, the present invention The embodiments and the features in the embodiments can be combined with each other.

[0045] In traditional applications based on the C / S (Client / Server, client / server) architecture, the client application program and the server application program cooperate with each other to provide services for users. The client application program refers to the c...

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 discloses a Java object reference method, Java object reference devices and a medium, which are used for solving the program crash problem due to that strong references cannot be automatically released and cause excessive occupied memories. The Java object reference method includes: when an intermediate variable object receives a reference request of requesting a reference of a second variable object by a first variable object, utilizing the intermediate variable object to invoke the second variable object according to the reference request, wherein the intermediate variable object is defined for the first variable object and the second variable object of which a strong-reference relationship exists; for the intermediate variable object, monitoring whether a preset releasingcondition is met; and invoking a releasing function to release the intermediate variable object when the preset releasing condition is met.

Description

technical field [0001] The present invention relates to the field of computer technology, in particular to a Java object reference method, device and medium. Background technique [0002] This section is intended to provide a background or context for implementations of the invention that are recited in the claims. The descriptions herein are not admitted to be prior art by inclusion in this section. [0003] Java object references include strong references, soft references, weak references, and phantom references. Among them, a strong reference refers to creating an object and assigning the object to a reference variable; a strong reference will never be garbage collected when it is pointed to by a reference variable. When the memory space is insufficient, the Java virtual machine would rather throw an Out Of Memory Error (memory overflow) error to cause the program to terminate abnormally, and will not arbitrarily recycle objects with strong references to solve the proble...

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
IPC IPC(8): G06F11/36
CPCG06F11/366
Inventor 梁宇轩
Owner TENCENT TECH (SHENZHEN) CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products