Workbench/questions/q_29f2e0c16ee842cfb4cec5d9b992317c
为什么 ThreadLocal 在线程池里要手动清理?
Canonical answer, answer variants, and source links stay together so this route can stand alone for review and study.
concurrencythreadlocal
- category
- java_concurrency
- difficulty
- unset
- source_count
- 1
- updated_at
- 2026-03-24 07:48:33Z
Canonical answer
The canonical answer is the default study anchor for this question.
线程复用会导致脏数据和内存泄漏。
Answer variants (1)
Variants stay visible so personal answers and concise versions can be compared quickly.
canonical
线程复用会导致脏数据和内存泄漏。
Related questions (1)
Related questions favor shared-source links first, then same-category fallback.
Redis 分布式锁会遇到哪些问题?1 shared source
distributed_systemlockredis
Metadata
Metadata stays visible while reviewing answers or jumping to source context.
review_status: active
personal_answer: no
sources linked: 1
Sources (1)
Each linked source keeps the question grounded in review-confirmed study context.
slice3-smoke-1774338509
interview_experienceInterview: 美团 / 后端开发 / 一面
Question 2: 为什么 ThreadLocal 在线程池里要手动清理?
Source answer: 线程复用会导致脏数据和内存泄漏。