Local variable passed to thread. May it get reclaimed by GC before thread completion??? How to avoid it???
Hello,
my questiong is, I believe, very simple.
I have a method and inside it I'm passing a local variable (of a reference type) to a newly created thread (created inside the method itself). Since the method may end while the thread may not have yet completed its work, I was wondering if anything must be done to avoid the garbage collector reclaiming the variable before the thread has completed.
Thx.
Bob Rock
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

MykonineRank #2,671 · 521 reputationPosted Aug 26, 2004, 6:59 AM EDT
spgilmoreRank #1,616 · 964 reputationPosted Aug 27, 2004, 11:14 AM EDT