my dog learned polymorphism
The moose likes Java in General and the fly likes Java Object destory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java Object destory " Watch "Java Object destory " New topic

Java Object destory

Kalaiselvan Selvamani
Ranch Hand

Joined: Sep 10, 2001
Posts: 32
Hii everyone,
I really need to destroy an object end of my program. But i dont know how to destroy a java object..
Editor editor = new Editor();
i want to destroy or kill this editor object end of my program.
How it is possible???
Thanx in Advance,
Anthony Villanueva
Ranch Hand

Joined: Mar 22, 2002
Posts: 1055
Unlike C++, the JVM performs most of your memory management, including garbage collection. There is no need to explicitly free the heap memory taken by your objects.
Kalaiselvan Selvamani
Ranch Hand

Joined: Sep 10, 2001
Posts: 32
Because of my need is,
I have created an entity bean.
Here have did some db process. In this mean time some outside sources updates or deletes some of my table in my DB. But the reflection is not affected in my Entity Bean. That's y i need to know how to destory the entity bean explicitly in my program..
Is there any possibilites. Let me know.
Thanx in Advance
Snigdha Solanki
Ranch Hand

Joined: Sep 07, 2000
Posts: 128
Set the reference to null
editor = null;

Snigdha<br />Sun Certified Programmer for the Java™ 2 Platform
I agree. Here's the link:
subject: Java Object destory
It's not a secret anymore!