Results 1 to 2 of 2
- 11-14-2007, 09:49 PM #1
Member
- Join Date
- Nov 2007
- Posts
- 1
- Rep Power
- 0
Local Variables for a static method - thread safe?
Are they?
Is the exact memory location used for a local variable?
The method is indeed static so it's in the same memory location, I assume, but are the local variables as well? If they are placed on the stack then there is a different copy for every calling thread.
Does anybody knows for sure?
Thanks,
-Michael
- 11-16-2007, 01:06 AM #2
Member
- Join Date
- Aug 2007
- Posts
- 47
- Rep Power
- 0
Similar Threads
-
Are Local variables thread safe ?
By samson in forum Threads and SynchronizationReplies: 6Last Post: 12-21-2010, 02:34 PM -
The safe way to stop a thread
By Java Tip in forum java.langReplies: 0Last Post: 04-09-2008, 06:31 PM -
Struts framework. Is this thread safe?
By JavaAl2 in forum Web FrameworksReplies: 1Last Post: 01-17-2008, 03:01 AM -
is synchronization on method passing local variables as parameters needed
By reddzer in forum Java ServletReplies: 0Last Post: 11-10-2007, 04:47 PM -
Error: Non-static method append(char) cannot be referenced from a static context
By paul in forum Advanced JavaReplies: 1Last Post: 08-07-2007, 05:05 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks