hpcc-systems/HPCC-Platform — pull request #4854 by dcamper (2013-09-23 16:31:47+00:00)
Title: HPCC-10060: Improve memory and thread handling of embedded Java code

Within destructor for JavaThreadContext class, add an explicit DetachCurrentThread() call to detatch the native thred from the JVM. This allows the JVM to more easily determine what needs to be garbaged collected.

Within the constructor and destructor for JavaEmbedImportContext class, add calls to push and pop a local reference frame in the JNI. This collects new local references and enables them to be GC'd when the frame is popped, freeing memory somewhat faster. Also, allow up to 64 local references to be tracked/created (up from the default of 16).