Publishing Engine Programmer's Guide > The Arbortext Publishing Engine Sub-Process > Writing Arbortext PE Applications in Java > Termination
  
Termination
When the Arbortext PE sub-process terminates, it will attempt to inform its embedded JVM. The JVM will then inform the Arbortext PE Application Context, which will call the destroy method of each loaded Arbortext Publishing Engine Java application. The destroy method should release resources, delete scratch files, and so forth.
An Arbortext PE sub-process can terminate without calling each Java Arbortext PE Application's destroy method. This might happen if the Arbortext PE sub-process crashes suddenly or is forced to terminate by the operating system. In these situations, system resources (open files, network resources, and so on) are deallocated by the system.