PTC Arbortext Publishing Engine Programmer's Guide (PTC Arbortext Publishing Engine 程式設計師指南) > The Arbortext Publishing Engine Sub-Process > Writing Arbortext PE 應用程式s in Java > Termination
  
Termination
When the Arbortext PE 子流程 terminates, it will attempt to inform its embedded JVM. The JVM will then inform the Arbortext PE 應用程式 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 子流程 can terminate without calling each Java Arbortext PE 應用程式's destroy method. This might happen if the Arbortext PE 子流程 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.