my dog learned polymorphism
The moose likes Beginning Java and the fly likes About 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 "About garbage collection ?" Watch "About garbage collection ?" New topic

About garbage collection ?


Joined: Sep 30, 2003
Posts: 3
Why can JAVA have the garbage collection function?
But other program like c and c++ can't.
I think it maybe about point(c and c++) and reference(JAVA), but I can't understand their relation clearly.
Have somebady can help me to understand , thank you !!
David Weitzman
Ranch Hand

Joined: Jul 27, 2001
Posts: 1365
Welcome to JavaRanch! Please change your display name to comply with the JavaRanch Naming Policy.
Actually C and C++ can be garbage collected. Garbage collection isn't optional in Java simply because James Gosling wanted it that way. It's not something particular to the language.

Joined: Sep 30, 2003
Posts: 3
Thank you a lot ^^ .
I already see that URL and chang my display name ...
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
Welcome to JavaRanch!
We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy. Note that single word names aren't allowed, nor are obviously fictitious ones.
Thanks Pardner! Hope to see you 'round the Ranch!

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
I agree. Here's the link:
subject: About garbage collection ?
It's not a secret anymore!