If an object is referenced by a local variable -- is it safe from concurrency issues?

Alex Chaffee

No. The local variable only holds a pointer to an object; if other threads can also point to this object, then it needs to be made thread-safe.

See also How do I ensure that my servlet is thread-safe?

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact