KR20060083321A - Method and apparatus for releasing image resource in java application - Google Patents

Method and apparatus for releasing image resource in java application Download PDF

Info

Publication number
KR20060083321A
KR20060083321A KR1020050003804A KR20050003804A KR20060083321A KR 20060083321 A KR20060083321 A KR 20060083321A KR 1020050003804 A KR1020050003804 A KR 1020050003804A KR 20050003804 A KR20050003804 A KR 20050003804A KR 20060083321 A KR20060083321 A KR 20060083321A
Authority
KR
South Korea
Prior art keywords
image
application
management table
identifier
java
Prior art date
Application number
KR1020050003804A
Other languages
Korean (ko)
Inventor
이두희
김광민
이정호
Original Assignee
삼성전자주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 삼성전자주식회사 filed Critical 삼성전자주식회사
Priority to KR1020050003804A priority Critical patent/KR20060083321A/en
Publication of KR20060083321A publication Critical patent/KR20060083321A/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

자바 애플리케이션의 이미지 리소스를 해지하는 방법 및 장치가 개시된다. 본 발명은, 자바 플랫폼이 구현된 사용자 기기에서 이미지 리소스를 해지하는 방법에 있어서, a)콘텐츠 제공자로부터 수신된 바이트 코드를 해석하는 단계; b)상기 바이트 코드에 대응하는 애플리케이션의 애플리케이션 식별자 및 상기 애플리케이션이 사용하는 이미지의 이미지 식별자를 포함하는 이미지 관리 테이블을 생성하는 단계; 및 c)상기 이미지 관리 테이블을 이용하여 상기 애플리케이션이 종료될 때마다 해지되지 않은 이미지를 해지하는 단계를 포함하고, 상기 이미지 관리 테이블은 상기 애플리케이션내에 포함된 매개변수인 콘텍스트를 이용하여 생성되는 것을 특징으로 한다. 본 발명에 의하면, 이미지 리소스를 최적으로 해지시킴으로써 사용자 기기의 리소스를 절약할 수 있다. A method and apparatus for releasing image resources of a Java application is disclosed. According to an aspect of the present invention, there is provided a method of releasing an image resource in a user device on which a Java platform is implemented, the method comprising: a) interpreting a byte code received from a content provider; b) generating an image management table including an application identifier of an application corresponding to the byte code and an image identifier of an image used by the application; And c) canceling an unreleased image each time the application is terminated using the image management table, wherein the image management table is generated using a context that is a parameter included in the application. It is done. According to the present invention, the resource of the user device can be saved by optimizing the image resource.

Description

자바 애플리케이션에서의 이미지 리소스 해지 방법 및 장치{Method and Apparatus for releasing image resource in Java application}Method and Apparatus for releasing image resource in Java application}

도 1은 자바 애플리케이션 중 엑스렛의 소스 코드를 나타내는 도면.1 is a diagram showing a source code of an X-let in a Java application.

도 2 는 자바 플랫폼이 구현된 사용자 기기의 내부 구성을 나타내는 도면.2 is a diagram illustrating an internal configuration of a user device in which the Java platform is implemented.

도 3 은 엑스렛으로 구현된 바이트 코드의 일 례를 나타내는 도면. 3 is a diagram illustrating an example of a byte code implemented by an X-let.

도 4 는 본 발명에 의한 이미지 리소스 해지 방법을 나타내는 도면.4 is a view showing a method of image resource release according to the present invention.

도 5 는 이미지 관리 테이블의 일례를 나타내는 도면이다.5 is a diagram illustrating an example of an image management table.

본 발명은 리소스 해지 방법 및 장치에 관한 것으로서, 보다 상세하게는 이미지 관리 테이블을 이용하여 자바 애플리케이션의 종료시 해지되지 않은 이미지를 애플리케이션 매니저가 자동으로 감지하여 이미지를 해지시키는 이미지 리소스 해제 방법에 관한 것이다.The present invention relates to a method and a device for resource release, and more particularly, to an image resource release method that the application manager automatically detects an image that has not been terminated upon termination of the Java application using the image management table to release the image.

TV나 DVD 플레이어는 지금까지 단순히 AV만을 보여 주었으나 최근 들어 DTV 셋탑이나 BD 플레이어에서 애플리케이션이 실행될 수 있는 환경을 제공한다. 콘텐츠 제공자는 이러한 애플리케이션을 통하여 사용자에게 다양한 정보를 제공하려 하 고 있다. 일반적으로, 애플리케이션 프로그램은 주로 자바를 이용하여 작성되고 바이트 코드의 형태로 콘텐츠 제공자로부터 DTV등의 사용자 기기로 제공된다. TVs and DVD players have only shown AV so far, but recently they have provided an environment in which applications can run on DTV set-tops or BD players. Content providers try to provide a variety of information to users through these applications. In general, application programs are mainly written using Java and are provided from a content provider to a user device such as a DTV in the form of byte code.

어플리케이션의 시작, 종료, 시스템 자원의 접근과 같은 동작들은 어플리케이션과 그 어플리케이션이 실행되는 OS사이에서 이루어지게 된다. 어플리케이션 모델은 어플리케이션이 어떻게 관리(manage)되어야 하는지를 정의하며, 어플리케이션이 실행되는 시스템과 어플리케이션 사이의 상호 역할을 정의한다. Java 2 Platform, Micro Edition(J2ME), Java 2 Platform, Sun Eition(J2SE)등은 현재 여러 가지의 어플리케이션 모델을 지원하고 있으며, 애플릿(applet), 미들릿(midlet), 엣스릿(xlet)등은 이러한 어플리케이션 모델의 한 일례이다.Operations such as starting, terminating, and accessing system resources are performed between the application and the OS on which it is run. The application model defines how the application should be managed, and defines the interaction between the application and the system on which it is run. The Java 2 Platform, Micro Edition (J2ME), Java 2 Platform, Sun Eition (J2SE), etc. currently support several application models. Applets, midlets, xlets, etc. One example of such an application model is.

DTV와 같은 임베디드(embedded) 기기에서의 자바의 실행을 위해, 썬 마이크로시스템(SUN)에서는 엣스렛(Xlet)을 제공하고 있다. 즉 애플릿이 브라우저내에서 수행되는 임베디드 애플리케이션인 반면, 엣스렛은 DTV 와 같은 다른 애플리케이션내에서 수행되는 임베디드 애플리케이션이다. To run Java on embedded devices such as DTV, Sun Microsystem (SUN) provides an Xlet. That is, while applets are embedded applications that run inside the browser, edgelets are embedded applications that run inside other applications, such as DTV.

Xlet은 Init, Start, Pause, Destroy의 4개의 state로 구성되어 있으며, 위의 각 상태로 들어가기 위해 initXlet, startXlet, pauseXlet, destroyXlet 의 4개의 메소드(method)를 제공하고 있다. 컨텐츠 제공자는 위 4개의 함수내에 자신이 구현하고자 하는 애플리케이션을 코딩함으로써 소스 코드를 생성하고, 소스 코드를 컴파일함으로써 바이트 코드를 생성하고, 생성한 바이트 코드를 방송 또는 인터넷등을 통해 DTV 와 같은 사용자 기기로 전송한다. Xlet is composed of four states, Init, Start, Pause, and Destroy, and provides four methods of initXlet, startXlet, pauseXlet, and destroyXlet to enter each state above. The content provider generates the source code by coding the application to be implemented in the above four functions, generates the byte code by compiling the source code, and sends the generated byte code to a user device such as a DTV through broadcasting or the Internet. To send.

바이트 코드를 전송받은 사용자 기기는 xlet을 재생할 수 있는 재생 엔진을 이용하여 해당 애플리케이션을 재생한다. 재생 엔진은 애플리케이션 메니저(Application Manager, AM)라는 프로그램에 의해 위 4가지 함수를 호출함으로써 애플리케이션을 제어한다. 예컨대 사용자가 DTV의 시청중 메뉴바를 디스플레이하는 애플리케이션을 실행시킨후, 사용자가 리모콘내의 메뉴바 종료 스위치를 누르면, 애플리케이션 메니저는 사용자 입력에 대한 응답으로 해당 애플리케이션의 destroy 함수를 호출함으로써 해당 애플리케이션을 종료한다.The user device, which has received the byte code, plays the application using a playback engine capable of playing the xlet. The playback engine controls the application by calling the above four functions by a program called Application Manager (AM). For example, if a user launches an application displaying a menu bar while viewing a DTV, and the user presses the menu bar end switch in the remote control, the application manager terminates the application by calling the destroy function of the application in response to user input. .

애플리케이션이 실행되기 위해서, 재생 엔진은 애플리케이션에서 사용되는 리소스들을 메모리에 로드하고, 애플리케이션이 종료할 때, 그 애플리케이션에서 사용되었던 리소스들을 해지(release)한다. In order for an application to run, the playback engine loads the resources used by the application into memory, and when the application exits, releases the resources that were used by the application.

도 1은 xlet 애플리케이션에서 이미지가 사용되었을 때 destroyXlet에서 사용된 이미지 객체에 대해 flush함수를 호출하는 코딩을 나타내는 소스 코드이다.1 is source code illustrating coding for calling the flush function on an image object used in destroyXlet when an image is used in an xlet application.

도 1 에 나타난 바와같이, 리소스의 해지는 리소스를 해지하기 위한 flush 함수를 호출함으로써 수행되고, flush 함수는 콘텐츠 제공자에 의해 Xlet의 코딩중에 destroyXlet() 메소드내에 이미 코딩되어 있어야 한다. 즉 사용자 기기내의 재생 엔진은 해당 애플리케이션의 종료시 콘텐츠 제공자가 코딩해놓은 내용에 따라 destroyXlet() 메소드를 수행시킬 뿐이다.  As shown in Figure 1, the release of a resource is performed by calling the flush function to release the resource, which must already be coded in the destroyXlet () method during coding of the Xlet by the content provider. In other words, the playback engine in the user device only executes the destroyXlet () method according to the content coded by the content provider at the end of the application.

destroyXlet 메소드 안에서 사용된 이미지 객체에 대해 flush함수가 호출되지 않았을 경우 그 이미지 객체가 사용하고 있던 리소스가 해지되지 않아서 사용자 기기의 리소스 특히 메모리 리소스를 낭비하게 된다. If the flush function is not called on the image object used in the destroyXlet method, the resources used by the image object will not be released, which wastes user device resources, especially memory resources.

즉 flush 함수를 호출하는 코딩 작업은 콘텐츠 제공자가 수행하여야하는데, 콘텐츠 제공자가 부주의하게 해지를 위한 코딩작업을 하지 않은 채 해당 소스 코드를 컴파일 후 사용자 기기로 전송하게 되면, 사용자 기기에서의 애플리케이션의 종료시 그 이미지 의해 사용된 리소스는 해지되지 않고 계속 남아있게 되어서 사용자기기는 불필요하게 리소스를 낭비하는 결과를 초래한다. In other words, the coding operation that calls the flush function should be performed by the content provider. When the source code is compiled and transmitted to the user device without inadvertently coding the content provider, the content provider must be executed. The resources used by the image remain unresolved, resulting in unnecessary waste of user equipment.

이런 현상은 콘텐츠 제공자에 부주의하게 코딩된 xlet 애플리케이션에 의해 발생할 수 있고 그런 애플리케이션을 반복적으로 실행했을 경우 사용자 기기의 리소스 특히 메모리를 계속 낭비함으로써 사용자 기기의 치명적인 오동작을 초래할 수 있다. This can be caused by an inadvertently coded xlet application in the content provider and can result in a fatal malfunction of the user device by repeatedly wasting the user device's resources, especially memory, if executed repeatedly.

더구나, 사용자 기기의 제작자의 입장에서는 이와 같은 오동작을 제어할 수 있는 수단이 없으므로, 컨텐츠 제작자의 실수로 인해 마치 사용자 기기의 성능이 나쁜 것으로 오해받을 수 있다는 문제점이 있다.Moreover, since there is no means for controlling such a malfunction from the point of view of the producer of the user device, there is a problem in that the performance of the user device may be misunderstood as bad due to the mistake of the content producer.

특히 자바 애플리케이션이 엑스렛인 경우, 콘텐츠 제공자가 생성한 콘텐츠에 의한 사용자 기기의 오동작은 사용자 기기의 제조자에 대한 불신을 야기시키므로 이러한 문제점은 더욱 심각하다.In particular, when the Java application is an X-let, this problem is more serious because malfunction of the user device due to the content generated by the content provider causes distrust to the manufacturer of the user device.

본 발명을 전술한 문제점을 해결하기 위해 안출된 것으로서, 자바 애플리케이션이 destroy 메소드내에서 자신이 사용한 이미지 객체의 flush 함수를 호출하지 않은 경우에도, 사용자 기기가 해당 애플리케이션의 종료시 해지되지 않은 이미지를 자동으로 감지하여 이미지를 해지시키는 이미지 리소스 해제 방법을 제공하고자 한다.The present invention has been made to solve the above-mentioned problem, and even if the Java application does not call the flush function of the image object used by the user in the destroy method, the user device automatically displays an image which has not been terminated upon termination of the application. An object of releasing an image resource that detects and releases an image is provided.

상기와 같은 목적을 달성하기 위해, 본 발명은, 자바 플랫폼이 구현된 사용자 기기에서 이미지 리소스를 해지하는 방법에 있어서, 이미지 관리 테이블을 이용하여, 콘텐츠 제공자로부터 제공된 애플리케이션이 사용한 이미지를 해지하는 단계를 포함하고, 상기 이미지 관리 테이블은 상기 애플리케이션에 포함된 매개변수인 콘텍스트를 이용하여 생성되고, 상기 애플리케이션 및 상기 애플리케이션이 사용하는 이미지를 리스트하는 것을 특징으로 한다. In order to achieve the above object, the present invention provides a method for revoking an image resource in a user device in which the Java platform is implemented, using the image management table to terminate the image used by an application provided by a content provider. And the image management table is generated using a context that is a parameter included in the application, and lists the application and an image used by the application.

여기서, 본 방법은, a)콘텐츠 제공자로부터 수신된 바이트 코드를 해석하는 단계; b)상기 바이트 코드에 대응하는 애플리케이션의 애플리케이션 식별자 및 상기 애플리케이션이 사용하는 이미지의 이미지 식별자를 포함하는 이미지 관리 테이블을 생성하는 단계; 및 c)상기 이미지 관리 테이블을 이용하여 상기 애플리케이션이 종료될 때마다 해지되지 않은 이미지를 해지하는 단계를 포함한다.Here, the method comprises: a) interpreting a byte code received from a content provider; b) generating an image management table including an application identifier of an application corresponding to the byte code and an image identifier of an image used by the application; And c) canceling an unreleased image each time the application is terminated by using the image management table.

여기서, 상기 c)단계는, c1)상기 이미지를 해지시키는 함수가 호출될 때마다 상기 이미지 관리 테이블에서 상기 이미지의 이미지 식별자를 삭제하는 단계; 및 c2)상기 애플리케이션을 종료시키는 메소드가 호출될 때마다, 상기 이미지 관리 테이블의 상기 애플리케이션 식별자에 해지되지 않고 남아 있는 이미지 식별자가 존재하는지 검사하는 단계를 포함한다. Here, the step c) may include: c1) deleting an image identifier of the image from the image management table each time the function of canceling the image is called; And c2) each time a method for terminating the application is called, checking whether there is an image identifier remaining in the application identifier of the image management table that remains unrevoked.

또한 여기서, 상기 c)단계는, c3)상기 이미지 관리 테이블에 해지되지 않은 이미지 식별자가 존재하는 경우에, 이미지를 해지시키는 함수를 호출함으로써 상기 이미지를 해지시키는 단계를 포함한다. Also, the step c) may include c3) canceling the image by calling a function to cancel the image when there is an image identifier which is not canceled in the image management table.

여기서, 상기 애플리케이션은 자바 애플릿, 미들릿 혹은 엑스렛 중 어느하나를 포함한다. Here, the application includes any one of a Java applet, a middlelet or an Xlet.

또한 본 발명은, 자바 플랫폼이 구현된 사용자 기기에서 이미지 리소스를 해지하는 장치에 있어서, a)상기 바이트 코드에 대응하는 애플리케이션의 애플리케이션 식별자 및 상기 애플리케이션이 사용하는 이미지의 이미지 식별자를 포함하는 이미지 관리 테이블; b)상기 이미지 관리 테이블을 이용하여 상기 애플리케이션이 종료될 때마다 해지되지 않은 이미지를 해지하는 애플리케이션 매니저를 포함하고, 상기 이미지 관리 테이블은 상기 애플리케이션내에 포함된 매개변수인 콘텍스트를 이용하여 생성된다. In another aspect, the present invention, the device for canceling the image resource in the user device implemented Java platform, a) an image management table including the application identifier of the application corresponding to the byte code and the image identifier of the image used by the application ; b) an application manager for canceling an unreleased image each time the application is terminated using the image management table, wherein the image management table is created using a context that is a parameter contained within the application.

이하, 첨부된 도면을 참조하여 본 발명에 따른 바람직한 일 실시예를 상세히 설명한다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.

이하에서 바이트 코드는 자바 언어로 작성되어 사용자 기기로 전송되는 모든 애플리케이션인 자바 애플리케이션을 포함하고, 자바 애플리케이션은 자바 애플릿, 미들렛, 엑스렛을 포함한다. 이하에서, 자바 애플리케이션은 엑스렛을 중심으로 설명하겠지만, 본 발명의 사상과 대치되지 않는한 자바 애플릿, 미들렛도 자바 애플리케이션에 포함된다.Hereinafter, the byte code includes a Java application, which is all applications written in the Java language and transmitted to the user device, and the Java application includes Java applets, middlelets, and Xlets. In the following, a Java application will be described based on the X-let, but Java applets and middlelets are also included in the Java application, unless they contradict the spirit of the present invention.

도 2 는 자바 플랫폼이 구현된 사용자 기기의 내부 구성을 나타내는 도면이다.2 is a diagram illustrating an internal configuration of a user device in which the Java platform is implemented.

자바 플랫폼은 운영 체제, 자바 버추얼 머신, 애플리케이션 매니저 및 자바 애플리케이션을 포함한다. The Java platform includes an operating system, a Java virtual machine, an application manager, and a Java application.

자바 버추얼 머신 JVM 은 자바로 코딩된 프로그램인 자바 애플릿을 해석(interprete)하고 실행하는 가상적 컴퓨터이다. 이 때 자바 애플릿은 자바 컴파일러에 의해 이미 컴파일된 상태인 바이트 코드(혹은 중간 코드)의 형태로 사용자 기기로 전송된다. 즉 자바 버추얼 머신은 바이트 코드를 해석하는 소프트 웨어이다. 자바 버추얼 머신을 실장한 컴퓨터라면 컴퓨터의 명령어 집합 아키텍처나 운영 체제에 관계 없이 원시 코드를 변경하거나 재컴파일할 필요없이 프로그램을 실행시킬 수 있다.The Java Virtual Machine JVM is a virtual computer that interprets and executes Java applets that are programs written in Java. At this point, the Java applet is sent to the user's device in the form of byte code (or intermediate code) that has already been compiled by the Java compiler. The Java virtual machine is software that interprets bytecode. A computer with a Java virtual machine can run a program without changing or recompiling the source code, regardless of the computer's instruction set architecture or operating system.

애플리케이션 매니저 AM 는 바이트 코드내에 구현된 4가지 상태 변환 메소드를 호출함으로써 애플리케이션의 상태(state)를 변환하고, 각 바이트 코드내에 구현된 애플리케이션이 사용한 리소스를 메모리에 로드하고 애플리케이션이 종료되면 사용한 리소스를 해지하는 프로그램이다. 위의 4가지 상태 변환 메소드 이외의 애플리케이션이 사용하는 함수의 호출은 자바 버추얼 머신에 의해 수행된다. 자바 애플릿의 경우 애플리케이션 매니저는 브라우저내에 구현되고, xlet 의 경우 사용자 기기내에 특별한 목적을 위해 사용자 기기내에 코딩된 프로그램에 포함된다.The application manager AM converts the state of the application by calling four state transition methods implemented in the bytecode, loads the resources used by the application implemented in each bytecode into memory, and releases the resources when the application terminates. It is a program. Calls to functions used by applications other than the four state transition methods above are performed by the Java virtual machine. In the case of Java applets, the application manager is implemented in the browser, and in the case of xlets, it is embedded in programs coded on the user device for special purposes within the user device.

도 3 은 엑스렛으로 구현된 바이트 코드의 일 례를 나타내는 도면이다. 3 is a diagram illustrating an example of a byte code implemented as an X-let.

바이트 코드(10)는 콘텐츠 제공자 CP 에 의해 코딩되어 사용자 기기 UD 로 전송된다. 사용자 기기 UD 는 도 2와 같은 자바 플랫폼을 포함한다. The byte code 10 is coded by the content provider CP and sent to the user device UD. The user device UD includes a Java platform as shown in FIG.

바이트 코드(10)는 4가지 상태 변환 메소드(20) 및 애플리케이션의 구체적인 코딩 내용을 나타내는 부분(30)을 포함한다. The byte code 10 includes four state transition methods 20 and a portion 30 representing specific coding contents of an application.

애플리케이션 매니저 AM 는 위의 4가지 상태 변환 메소드(20)를 호출함으로 써 애플리케이션(자바 애플릿 혹은 엑스렛)을 제어하고, 자바 버추얼 머신 JVM 은 애플리케이션 부분(30)내에 구현된 여러 가지 함수를 호출함으로써 애플리케이션의 구체적인 내용을 실행한다.The application manager AM controls the application (Java applet or Xlet) by calling the four state transition methods 20 above, and the Java virtual machine JVM calls the various functions implemented in the application portion 30 Execute the specifics of.

도 4 는 본 발명에 의한 이미지 리소스 해지 방법을 나타내는 도면이다.4 is a view showing an image resource release method according to the present invention.

단계 410에서, 사용자 기기는 콘텐츠 제공자로부터 바이트 코드를 수신하고, 자바 버추얼 머신은 바이트 코드를 해석(interpret)한다.In step 410, the user device receives the byte code from the content provider, and the Java virtual machine interprets the byte code.

해석된 코드에 의해, 애플리케이션 매니저는 바이트 코드에 의해 추출된 4가지 상태 변환 메소드를 호출함으로써 애플리케이션의 상태를 결정 및 변환하고, 자바 버추얼 머신은 자바 애플리케이션을 실행한다. By the interpreted code, the application manager determines and transforms the state of the application by calling four state transition methods extracted by the byte code, and the Java virtual machine executes the Java application.

바이트 코드는 initxlet(), startxlet(), pausexlet() 및 destroyxlet()의 4개의 메소드를 포함하며, 위의 각 함수의 내부에 콘텐츠 제공자에 의해 코딩된 애플리케이션이 존재한다. The byte code contains four methods: initxlet (), startxlet (), pausexlet (), and destroyxlet (), and there is an application coded by the content provider inside each of the above functions.

바이트 코드는 애플리케이션의 동작 환경을 설정하는 매개변수인 콘텍스트 Context를 포함하고, 콘텍스트 Context 는 애플리케이션 식별자 ID_appl 및 해당 애플리케이션이 사용하는 리소스에 관한 정보를 나타내는 리소스 정보를 포함한다.The byte code includes a context Context which is a parameter for setting an operating environment of the application, and the context Context includes resource identifier indicating information about an application identifier ID_appl and a resource used by the corresponding application.

단계 420에서, 애플리케이션 메니저는 콘텍스트 매개변수 Context로부터 애플리케이션 식별자 ID_appl 를 추출하고, 애플리케이션이 실행되는 도중에 생성된 각각의 이미지마다 이미지 식별자 ID_img 를 할당한후, 애플리케이션 식별자 ID_appl 및 이미지 식별자 ID_img를 이미지 관리 테이블에 저장한다.In step 420, the application manager extracts the application identifier ID_appl from the context parameter Context, assigns the image identifier ID_img to each image created while the application is running, and then assigns the application identifier ID_appl and the image identifier ID_img to the image management table. Save it.

단계 430에서, 애플리케이션 매니저에 의해 상태 변환 메소드 start()가 호 출되고, 자바 버추얼 머신에 의해 애플리케이션을 실행시키는 중에 flush()함수가 호출되면, flush()함수가 호출될 때마다, 애플리케이션 매니저는 단계 420에서의 이미지 관리 테이블에서 flush()함수를 호출한 애플리케이션의 애플리케이션 식별자 ID_appl 및 flush()함수의 대상인 이미지의 이미지 식별자 ID_img를 삭제한다.In step 430, if the state transition method start () is called by the application manager and the flush () function is called while executing the application by the Java virtual machine, each time the flush () function is called, the application manager In the image management table in step 420, the application identifier ID_appl and the image identifier ID_img of the image that is the target of the flush () function of the application calling the flush () function are deleted.

단계 435에서, 애플리케이션의 destroy()메소드가 호출됨으로써 애플리케이션이 종료된다.In step 435, the application is terminated by calling the destroy () method of the application.

단계 440에서, 애플리케이션 메니저는 이미지 관리 테이블에 해당 애플리케이션 식별자 ID_appl 및 이와 연결된 이미지 식별자 ID_img 가 존재하는지 검사한다. 만약 존재한다면 단계 460으로 진행하고, 그렇지 않으면 단계 450으로 진행한다.In operation 440, the application manager checks whether a corresponding application identifier ID_appl and an associated image identifier ID_img exist in the image management table. If so, go to step 460; otherwise, go to step 450.

만약 콘텐츠 제공자가 애플리케이션을 정상적으로 코딩하였다면, 콘텐츠 제공자는 이미지 리소스를 해제하기 위해 이미지마다 flush()함수를 코딩하였을 것이기 때문에, 이미지 관리 테이블에 더 이상 해당 애플리케이션의 애플리케이션 식별자 ID_appl 에는 이미지 식별자 ID_img 가 하나도 존재하지 않을 것이다. If the content provider successfully coded the application, the content provider would have coded the flush () function for each image to release the image resource, so there is no more image identifier ID_img in the application identifier ID_appl of the application in the image management table. I will not.

단계 450에서, 해지되지 않은 이미지가 존재하지 않기 때문에, 애플리케이션 매니저는 애플리케이션을 정상적으로 종료한다.In step 450, the application manager terminates the application normally because there is no image released.

단계 460에서, 애플리케이션 매니저는 이미지 관리 테이블에 잔존하는 이미지 식별자에 대응하는 이미지에 대하여 flush()함수를 호출함으로서 남아 있는 이미지를 해제한다.In step 460, the application manager releases the remaining image by calling the flush () function on the image corresponding to the image identifier remaining in the image management table.

도 5 는 이미지 관리 테이블의 일례를 나타내는 도면이다.5 is a diagram illustrating an example of an image management table.

이미지 관리 테이블은 애플리케이션 매니저에 의해 생성되며, 애플리케이션 식별자 ID_appl 및 이미지 식별자 ID_img를 포함한다. 각각의 애플리케이션이 어떤 이미지를 사용하는지에 관한 정보는 콘텍스트 매개변수로부터 추출할 수 있다.The image management table is created by the application manager and includes an application identifier ID_appl and an image identifier ID_img. Information about which image each application uses can be extracted from the context parameter.

도 5에 따르면, 애플리케이션 APPL_1 은 두 개의 이미지 img_1, img_2를 리소스로서 사용하고 있음을 알 수 있고, 애플리케이션 APPL_2 은 하나의 이미지 img_3를 리소스로서 사용하고 있음을 알 수 있다. 물론 리스트된 이미지는 해지되지 않고 남은 리소스를 나타낸다.According to FIG. 5, it can be seen that the application APPL_1 uses two images img_1 and img_2 as resources, and the application APPL_2 uses one image img_3 as a resource. Of course, the listed images represent the remaining resources without being released.

한편, 본 발명에 따른 이미지 리소스 해지 방법은 컴퓨터 프로그램으로 작성 가능하다. 상기 프로그램을 구성하는 코드들 및 코드 세그먼트들은 당해 분야의 컴퓨터 프로그래머에 의하여 용이하게 추론될 수 있다. 또한, 상기 프로그램은 컴퓨터가 읽을 수 있는 정보저장매체(computer readable media)에 저장되고, 컴퓨터에 의하여 읽혀지고 실행됨으로써 이미지 리소스 해지 방법을 구현한다. 상기 정보저장매체는 자기 기록매체, 광 기록매체, 및 캐리어 웨이브 매체를 포함한다.On the other hand, the image resource release method according to the present invention can be created by a computer program. Codes and code segments constituting the program can be easily inferred by a computer programmer in the art. The program is also stored in a computer readable media, and read and executed by a computer to implement the method of image resource release. The information storage medium includes a magnetic recording medium, an optical recording medium, and a carrier wave medium.

이제까지 본 발명에 대하여 그 바람직한 실시예들을 중심으로 살펴보았다. 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자는 본 발명이 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 구현될 수 있음을 이해할 수 있을 것이다. 그러므로 개시된 실시예들은 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 한다. 본 발명의 범위는 전술한 설명이 아니라 특허청구범위에 나타나 있으며, 그와 동등한 범위 내에 있는 모든 차이점은 본 발명에 포함된 것으로 해석되어야 할 것이다.So far I looked at the center of the preferred embodiment for the present invention. Those skilled in the art will appreciate that the present invention can be implemented in a modified form without departing from the essential features of the present invention. Therefore, the disclosed embodiments should be considered in descriptive sense only and not for purposes of limitation. The scope of the present invention is shown in the claims rather than the foregoing description, and all differences within the scope will be construed as being included in the present invention.

전술한 바와 같이 본 발명에 의하면, 엑스렛과 같은 자바 애플리케이션이 애플리케이션을 종료시키는 상태 변환 메소드인 destroy 메소드내에서 자신이 사용한 이미지 객체의 flush 함수를 호출하지 않은 경우에도, 애플리케이션 매니저가 이미지 관리 테이블을 이용하여 애플리케이션의 종료시 해지되지 않은 이미지를 자동으로 감지하여 이미지를 해지시킴으로서 리소스를 최적으로 절약할 수 있다. As described above, according to the present invention, even if a Java application such as an Xlet does not call the flush function of an image object used by itself in a destroy method, which is a state transformation method of terminating the application, the application manager may not execute the image management table. It can automatically detect images that have not been terminated at the end of the application and terminate the images to save resources optimally.

Claims (10)

자바 플랫폼이 구현된 사용자 기기에서 이미지 리소스를 해지하는 방법에 있어서,In the method of releasing the image resource in the user device that the Java platform is implemented, 이미지 관리 테이블을 이용하여, 콘텐츠 제공자로부터 제공된 애플리케이션이 사용한 이미지를 해지하는 단계를 포함하고,  Using the image management table to terminate the image used by the application provided from the content provider, 상기 이미지 관리 테이블은 상기 애플리케이션에 포함된 매개변수인 콘텍스트를 이용하여 생성되고, 상기 애플리케이션 및 상기 애플리케이션이 사용하는 이미지를 리스트하는 것을 특징으로 하는 방법. And the image management table is generated using a context which is a parameter included in the application, and lists the application and the images used by the application. 제 1 항에 있어서,The method of claim 1, a)콘텐츠 제공자로부터 수신된 바이트 코드를 해석하는 단계;a) interpreting the byte code received from the content provider; b)상기 바이트 코드에 대응하는 애플리케이션의 애플리케이션 식별자 및 상기 애플리케이션이 사용하는 이미지의 이미지 식별자를 포함하는 이미지 관리 테이 블을 생성하는 단계; 및b) generating an image management table including an application identifier of an application corresponding to the byte code and an image identifier of an image used by the application; And c)상기 이미지 관리 테이블을 이용하여 상기 애플리케이션이 종료될 때마다 해지되지 않은 이미지를 해지하는 단계를 포함하는 것을 특징으로 하는 방법.c) using the image management table to terminate the unreleased image each time the application is terminated. 제 2 항에 있어서, 상기 c)단계는, The method of claim 2, wherein c) is c1)상기 이미지를 해지시키는 함수가 호출될 때마다 상기 이미지 관리 테이블에서 상기 이미지의 이미지 식별자를 삭제하는 단계; 및c1) deleting the image identifier of the image from the image management table each time the function for terminating the image is called; And c2)상기 애플리케이션을 종료시키는 메소드가 호출될 때마다, 상기 이미지 관리 테이블의 상기 애플리케이션 식별자에 해지되지 않고 남아 있는 이미지 식별자가 존재하는지 검사하는 단계를 포함하는 것을 특징으로 하는 방법.c2) each time the method of terminating the application is called, checking whether there is an image identifier remaining in the application identifier of the image management table that remains unrevoked. 제 3 항에 있어서, 상기 c)단계는, The method of claim 3, wherein step c) c3)상기 이미지 관리 테이블에 해지되지 않은 이미지 식별자가 존재하는 경우에, 이미지를 해지시키는 함수를 호출함으로써 상기 이미지를 해지시키는 단계를 포함하는 것을 특징으로 하는 방법.c3) if there is an image identifier in the image management table that has not been revoked, revoking the image by calling a function to revoke the image. 제 2 항에 있어서, 상기 애플리케이션은 자바 애플릿, 미들릿 혹은 엑스렛 중 어느하나를 포함하는 것을 특징으로 하는 방법. 3. The method of claim 2, wherein the application comprises one of a Java applet, a middlelet or an Xlet. 자바 플랫폼이 구현된 사용자 기기에서 이미지 리소스를 해지하는 장치에 있 어서,In a device that frees up image resources on a user device with the Java platform implemented, a)상기 바이트 코드에 대응하는 애플리케이션의 애플리케이션 식별자 및 상기 애플리케이션이 사용하는 이미지의 이미지 식별자를 포함하는 이미지 관리 테이블a) an image management table including an application identifier of an application corresponding to the byte code and an image identifier of an image used by the application b)상기 이미지 관리 테이블을 이용하여 상기 애플리케이션이 종료될 때마다 해지되지 않은 이미지를 해지하는 애플리케이션 매니저를 포함하고,b) an application manager for canceling an unreleased image each time the application is terminated using the image management table; 상기 이미지 관리 테이블은 상기 애플리케이션내에 포함된 매개변수인 콘텍스트를 이용하여 생성되는 것을 특징으로 하는 장치.And said image management table is created using a context that is a parameter contained within said application. 제 6 항에 있어서, 상기 애플리케이션 매니저는, The method of claim 6, wherein the application manager, 상기 이미지를 해지시키는 함수가 호출될 때마다 상기 이미지 관리 테이블에서 상기 이미지의 이미지 식별자를 삭제하고,Each time the function to terminate the image is called, the image identifier of the image is deleted from the image management table, 상기 애플리케이션을 종료시키는 메소드가 호출될 때마다, 상기 이미지 관리 테이블의 상기 애플리케이션 식별자에 해지되지 않고 남아 있는 이미지 식별자가 존재하는지 검사하고, Each time a method that terminates the application is called, it is checked whether there is an image identifier remaining in the application identifier of the image management table that remains unrevoked, 상기 이미지 관리 테이블에 해지되지 않은 이미지 식별자가 존재하는 경우에, 이미지를 해지시키는 함수를 호출함으로써 상기 이미지를 해지시키는 것을 특징으로 하는 장치.And in the case where there is an image identifier which is not canceled in the image management table, calling the function to cancel the image. 제 6 항에 있어서, 상기 애플리케이션은 자바 애플릿, 미들릿 혹은 엑스렛 중 어느하나를 포함하는 것을 특징으로 하는 장치. 7. The apparatus of claim 6, wherein the application comprises one of a Java applet, a middlelet or an Xlet. 제 6 항의 리소스 해지 장치를 포함하는 자바 애플리케이션 재생 장치.Java application playback device comprising the resource cancellation device of claim 6. 제1항 내지 제5항 중 어느 한항에 기재된 방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체.A computer-readable recording medium having recorded thereon a program for executing the method according to any one of claims 1 to 5.
KR1020050003804A 2005-01-14 2005-01-14 Method and apparatus for releasing image resource in java application KR20060083321A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020050003804A KR20060083321A (en) 2005-01-14 2005-01-14 Method and apparatus for releasing image resource in java application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020050003804A KR20060083321A (en) 2005-01-14 2005-01-14 Method and apparatus for releasing image resource in java application

Publications (1)

Publication Number Publication Date
KR20060083321A true KR20060083321A (en) 2006-07-20

Family

ID=37173705

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020050003804A KR20060083321A (en) 2005-01-14 2005-01-14 Method and apparatus for releasing image resource in java application

Country Status (1)

Country Link
KR (1) KR20060083321A (en)

Similar Documents

Publication Publication Date Title
EP1890231A2 (en) Playback of audio-video content and an associated java application from an optical disc
WO2020223371A1 (en) Robotic process automation system with separate platform, bot and command class loaders
KR100714710B1 (en) Apparatus and method for forcibly terminating thread blocked by i/o operation
CN106371752B (en) A kind of the virtual key implementation method and device of Android system intelligent terminal
CN105183457B (en) Method and device for monitoring interface life cycle callback
US8418169B2 (en) Management method for managing software module and information processor
EP1745371B1 (en) Method and apparatus for automatically selecting a software application
KR20020035567A (en) Object property meta model emulator for legacy data structures
RU2483345C2 (en) Information processing device, information processing method and program
KR20040049488A (en) Apparatus and method for executing an applet
CN102355603B (en) Middleware system based on wired digital television set top box middleware
JP2007207226A (en) Extensible user interface extension method for componentized application environment, componentized application environment data processing system, and computer program
CN111427594B (en) Application program running method and device
US8332759B2 (en) Apparatus and method for converting the visual appearance of a Java application program in real time
CN106980531B (en) Input method operation processing method and device
JPWO2004034698A1 (en) Information processing device
CN112702647B (en) Play control method, intelligent television and computer readable storage medium
CN108228266B (en) Method and device for starting Fragment component between different plug-ins under Android plug-in framework
KR101254756B1 (en) Method of creating virtual machine compatible with multiple operating system, and program recording media for virtual machine
KR20060083321A (en) Method and apparatus for releasing image resource in java application
KR101095426B1 (en) Method for execurting xlet application and recording medium
JP2007316937A (en) Gateway control method
CN110721474A (en) Method and device for editing game skills
KR101144346B1 (en) Method of managing java application and computer-readable medium having thereon program performing function embodying the same
Fuentes et al. Development of Ambient Intelligence Applications using Components and Aspects.

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E601 Decision to refuse application