English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I know garbage collection takes over, but why can't you explicitly delete objects in java? It seems that with programming languages, or you can either have something like garbage collection, or you have to manage memory yourself. Is there a reason there can't be both? Is there a reason there ISN'T both?

2006-10-05 16:07:44 · 3 answers · asked by arnie 2 in Computers & Internet Programming & Design

3 answers

not quite sure, like you can set objects to null to have the garbage collect get it. I looked it up in my java 5 book from last semester of college and it says that there is no way to delete and it doesnt give an answer, thatsd a good question.

2006-10-05 16:26:17 · answer #1 · answered by fullerfyed 3 · 0 0

make that object as null like this if clsAdd is a class
clsAdd objAdd = new clsAdd();




at the end where u want to delete object make it as null

objAdd = null;

2006-10-05 18:57:40 · answer #2 · answered by H@ri 2 · 0 0

do you what the use of a de-constructor is?

2006-10-05 16:09:21 · answer #3 · answered by D 4 · 0 0

fedest.com, questions and answers