|
-
Oct 18th, 2005, 05:10 PM
#1
Thread Starter
Frenzied Member
question about garbage collection...
how do you explicitly "DESTROY" objects in java? I know about the garbage collection doing it on its own but i'm looking for something more like in vb.net, such as:
myObject = nothing
-
Oct 19th, 2005, 02:52 AM
#2
Fanatic Member
Re: question about garbage collection...
Best I can think of is using the null keyword:
myObject = null;
sql_lall 
-
Oct 19th, 2005, 05:18 AM
#3
Frenzied Member
Re: question about garbage collection...
You don't.. It's automatic and happens periodically. You can set them to null like sqlall said, to maybe prevent errors or already have the object initialized for further use.
-
Oct 19th, 2005, 05:08 PM
#4
Thread Starter
Frenzied Member
Re: question about garbage collection...
-
Oct 24th, 2005, 11:41 PM
#5
Dazed Member
Re: question about garbage collection...
Yeah just dangle the ref and the garbage collector should reclaim the allocated memory.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|