Will ExecutorService.newFixedThreadPool.submit (new class ()) cause the memory leak?

I am trying to use ExecutorService.newFixedThreadPool

to run multiple tasks. Every time I go to ExecutorService

I am new to class()

which contains information related to the job.

Will this cause memory leaks over time?

For example, will there be 1M classes if I'm submit()

1M times?


source to share

1 answer

No executor service will contain a link outside of the task's expiration date.



All Articles