Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
References remain on Thread stack
- From: davids@xxxxxxxxxxxxxxxx (David Soroko)
- Subject: References remain on Thread stack
- Date: Tue, 31 Aug 1999 20:51:04 +0200
References remain on Thread stack
Suppose I have daemon Runnable whose run() looks like this:
public void run()
{
while( !_stop )
{
waitForSomeConditionToBecomeTrue();
doSomeWork();
}
}
Now, in the doSomeWork() method local variables are created. The behavior
that I see is that between iterations of the while loop, these variables are
never GCed. The profiler I am using (OptimizeIt) indicates that these
local variables remain on the thread's stack. This is a concern to me
since these variables potentially occupy a lot of memory and there can be
long intervals of time between the while() iterations.
Is there a way to purge the thread's stack of references? Is this the
officially correct behavior of the GC?
--
============================================
David Soroko
mailto://davids@xxxxxxxxxxxxxxxx
http://www.geocities.com/SiliconValley/Campus/1628/
Group Manager, Core Technologies
Manna Inc.
============================================
- Prev by Date: Cut and Paste
- Next by Date: Cut and Paste
- Previous by thread: Help!!AccessControlException:java.io.FilePermission
- Next by thread: References remain on Thread stack
- Index(es):