JAXBContext.newInstance memory leak
问题 After a recent deployment in system test, one of our servlets was getting hit much harder than usual and we noticed memory started climbing and weblogic would eventually die. My intern, I was very proud, discovered the source of the memory leak. Whenever a request comes in, this line gets called: JAXBContext jc = JAXBContext.newInstance(“ruby.oracle_servlet.schemas”); For some reason, the object never gets garbage collected. Once we made it static and moved where we initialized it, our memory