A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
byte array and garbage collection
Joined: Nov 05, 2000
Jan 07, 2008 23:35:00
My program spawns many threads. Each thread will allocate a byte array of size 100,000. Do I need to null the array within each worker thread as they are about to die ?
Jesper de Jong
Joined: Aug 16, 2005
Jan 08, 2008 01:05:00
An object becomes eligible for garbage collection when there is no live thread that holds a reference to the object.
Setting variables to null in a thread that's going to stop immediately after that doesn't help anything for garbage collection.
Java Beginners FAQ
JavaRanch SCJP FAQ
The Java Tutorial
Java SE 8 API documentation
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
subject: byte array and garbage collection
How to convert RAW(32) to String?
db access returning String
byte array to String
unable to read file header
split text file into bytesize chunks!
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015