I have read a lot of post (like this, this, this) and they suggests that JAXBContext.newInstance
caused memory leak, now my understanding is that once method execution is over, all local objects created inside the method will be eligible for GC, so I wonder that how JAXBContext.newInstance
caused memory.
Asked
Active
Viewed 808 times
0

pjj
- 2,015
- 1
- 17
- 42
-
1https://github.com/javaee/jaxb-v2/issues/831 – Ivan Mar 29 '18 at 18:08
1 Answers
0
One of the reasons is that JAXB runtime uses ThreadLocal
here and there, sometimes static. This may be a source of memory leaks:

lexicore
- 42,748
- 17
- 132
- 221