Article View: borland.public.jbuilder.java.language
Article #14728Circular references and garbage collecting
From: Mika Ylikangas
Date: Thu, 05 Aug 1999 00:00
Date: Thu, 05 Aug 1999 00:00
19 lines
875 bytes
875 bytes
Hi!
Is following a problem with Java- language?
class Parent {
Vector of Child;
}
class Child {
Parent parent;
}
When the reference to Parent-object is lost from the client, the Parent
should be garbage collected, but in the Child- objects there are references
to Parent. So, can Java's garbage collector handle this kind of situation?
If not, then what is the best way to deal with it?
Any ideas are welcome
Mika Ylikangas
Technical Details
Message-ID:
<01bedf4a$c23c2c90$d9c6a5c3@PPC23>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,3f24176e9efa3a85,start X-Google-Attributes: gidf74b3,public From: "Mika Ylikangas" <mika.ylikangas@fidaco.fi> Subject: Circular references and garbage collecting Date: 1999/08/05 Message-ID: <01bedf4a$c23c2c90$d9c6a5c3@PPC23> X-Deja-AN: 509183782 Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.language