java - ThreadLocal and Memory usage -
threadlocal created have separate copy of objects operate on in threadsafe manner.
this means number of objects in process increase number of threads. because, each thread create own copy of threadlocals.
- does not increase memory requirement of process ?
you seem imply threadlocal
s specific culprit increases memory usage, in fact question not particularly related threadlocal
s per se. in situation describe, merely object have been allocated @ point , go unreacheable when thread dies @ latest.
Comments
Post a Comment