Re: What is Garbage Collection?
"MadWizard" <email@example.com> wrote:
>Please answer to the question.
>What is Garbage Collection?
>Thanks in advance!
In Java you don't have to destroy your objects like in c++. The garbage
collector does that for you.
By using a "finalize" method in your classes, you can observe when your objects
actually do get destroyed. You can also trigger error messages there if
destroying the object will cause problems under certain conditions.
The garbage collector runs when he's afraid of running out of memory. You
can force him to run by doing a "System.gc()".
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL