Memory Management

Adobe PDF Library Java/Maven

Adobe PDF Library (APDFL) objects can be associated with a large amount of unmanaged memory which exert little memory pressure on the runtime, which means there may be a long period before the garbage collector deletes these objects. The garbage collector is not aware of the size of the unmanaged or native objects in APDFL.

Once the garbage collection happens, a large amount of memory associated with objects no longer in use is freed. It is important then to release the unmanaged resources in APDFL as soon as an object is no longer in use.   

It is important then to release the unmanaged resources in APDFL as soon as a object is no longer in use.

To do this, call delete() method of the Object's class.