Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2005

Tip: Looking for answers? Try searching our database.

GC Behavior

Thread view: 
rothemon - 01 Nov 2005 18:05 GMT
Consider a doubly-linked list holding a handful of nodes.  If the list
is cleared by nulling the head and tail references, is the GC
intelligent enough to dispose of all of the nodes?  For example, the
first node will no longer be referenced by the list, but it will be
referenced by the second node.  Likewise, the second node will be
referenced by the first and third nodes, and so on.

Any thoughts?
Andrew Thompson - 01 Nov 2005 18:18 GMT
> Any thoughts?

Yes, that is spelt better.  But I doubt it will make
anyone *more* likely to reply.  Minor typos. are ignored
by most posters to these groups, most of whom also
prefer to see posts once only.

[ Just a thought for next time. ]
Andy - 01 Nov 2005 18:51 GMT
> Consider a doubly-linked list holding a handful of nodes.  If the list
> is cleared by nulling the head and tail references, is the GC
[quoted text clipped - 4 lines]
>
> Any thoughts?

The GC will pick up these 'islands'.
Roedy Green - 02 Nov 2005 01:05 GMT
>Consider a doubly-linked list holding a handful of nodes.  If the list
>is cleared by nulling the head and tail references, is the GC
>intelligent enough to dispose of all of the nodes?

Yes.  It does not work by reference counting. See
http://mindprod.com/jgloss/gc.html
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.