An electronic device comprising: a processor; and a memory electrically connected to the processor, wherein the memory is configured to store multiple Java application programs, and stores instructions that, when executed, cause the processor to execute a virtual machine configured to execute at least one Java application stored in the memory, and in response to generation of an object being detected during execution of the Java application, the virtual machine is configured to: generate a reference including reference information for the generated object; store the reference in a reference table having a specified size; characterized by: in response to the number of references stored in the reference table exceeding a first criterion value, generates ownership information including information on an application having generated each object associated with each of the references; analyze the ownership information to identify an application which has generated a number of objects exceeding a specified threshold, and offer information on the identified application to the processor, wherein the processor is configured to request an instruction for ending the operation of the identified application or for deleting the identified application, and to process the identified application according to the received instruction. a processor; and a memory electrically connected to the processor, wherein the memory is configured to store multiple Java application programs, and stores instructions that, when executed, cause the processor to execute a virtual machine configured to execute at least one Java application stored in the memory, and in response to generation of an object being detected during execution of the Java application, the virtual machine is configured to: generate a reference including reference information for the generated object; store the reference in a reference table having a specified size; characterized by: in response to the number of references stored in the reference table exceeding a first criterion value, generates ownership information including information on an application having generated each object associated with each of the references; analyze the ownership information to identify an application which has generated a number of objects exceeding a specified threshold, and offer information on the identified application to the processor, wherein the processor is configured to request an instruction for ending the operation of the identified application or for deleting the identified application, and to process the identified application according to the received instruction. generate a reference including reference information for the generated object; store the reference in a reference table having a specified size; characterized by: in response to the number of references stored in the reference table exceeding a first criterion value, generates ownership information including information on an application having generated each object associated with each of the references; analyze the ownership information to identify an application which has generated a number of objects exceeding a specified threshold, and offer information on the identified application to the processor, wherein the processor is configured to request an instruction for ending the operation of the identified application or for deleting the identified application, and to process the identified application according to the received instruction. in response to the number of references stored in the reference table exceeding a first criterion value, generates ownership information including information on an application having generated each object associated with each of the references; analyze the ownership information to identify an application which has generated a number of objects exceeding a specified threshold, and offer information on the identified application to the processor, wherein the processor is configured to request an instruction for ending the operation of the identified application or for deleting the identified application, and to process the identified application according to the received instruction.