Java Memory Management

JavaBlock release any Java objects created during evaluation once evaluation finishes

BeginJavaBlock, EndJavaBlock mark the beginning and end of a Java block

KeepJavaObject allow a Java object to persist when the current JavaBlock ends

ReleaseJavaObject finish using a Java object in the Wolfram Language

SameObjectQ whether two JavaObject expressions reference the same Java object

LoadedJavaObjects, LoadedJavaClasses list all Java objects or classes in use

Related Tutorials