Re: What is Garbage Collection?
"MadWizard" <firstname.lastname@example.org> 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()".
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center