Two Laptop Bag*
The moose likes Beginning Java and the fly likes Garbage Collection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Garbage Collection" Watch "Garbage Collection" New topic

Garbage Collection

Kaustubh Bansal

Joined: Jan 19, 2009
Posts: 2
Is it possible for an unreferenced object to be in use?

In this code, we are adding a button to a content pane to a frame. Is this content pane eligible for garbage collection?
Daesung Park
Ranch Hand

Joined: Mar 22, 2007
Posts: 68
The content pane is not garbage-collected as long as frame is a live object.

Daesung Park

Campbell Ritchie

Joined: Oct 13, 2005
Posts: 38007
Kaustubh Bansal wrote:Is it possible for an unreferenced object to be in use?
Read your question very very carefully . . .
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Garbage Collection
Similar Threads
How to Add Scroll bars to a frame
trying to creat JFrame with buttons
Component on Image
How to add scrollbar