I am using Rhino to compile and run .js files from within a servlet. When I hit the servlet from a browser several times, I see each execution creates one or may be more instances of java.lang.ref.Finalizer and never releases it.
When I took a heap dump and analyzed it with Eclipse Memory Analyzer I see each java.lang.ref.Finalizer refers to another instance of Finalizer like a chain: java.lang.ref.Finalizer -> java.lang.ref.Finalizer - > java.lang.ref.Finalizer -> java.lang.ref.Finalizer -> and so on. Also, each java.lang.ref.Finalizer would also refer to a FileInputStream with the file descriptor value of -1. Inside the Servlet I am not compiling the .js files, I run it with setOptimizationLevel(-1) which only interprets the files. Also, all open files are clearly close inside of the finally clause. I wonder if there is a common flaw of some sort that would cause this java.lang.ref.Finalizer chain in the heap. _______________________________________________ dev-tech-js-engine-rhino mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino
