Open Interview

Workbench shell

local-first
Provider not connected
Workbench/questions/q_e5bf96a0d3f14864a0f10b90134a45af

ThreadLocal 在线程池里有什么风险?

Canonical answer, answer variants, and source links stay together so this route can stand alone for review and study.

acceptance-smokeconcurrencythreadlocal
category
java_concurrency
difficulty
unset
source_count
1
updated_at
2026-03-24 14:22:55Z

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 (2)

Related questions favor shared-source links first, then same-category fallback.

java_concurrencyconcurrencythreadlocal
java_concurrencyjavathreadlocal

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.

Manual Q&A - ThreadLocal 在线程池里有什么风险?

manual_input
Question: ThreadLocal 在线程池里有什么风险? Answer: 线程复用时如果不清理,可能造成脏数据和内存泄漏。