Terminating the Engine

The following example shows how to terminate the PMX_ENGINE object and release associated resources.

/* Unload PMX_ENGINE e */
   
e->vtbl->destroy(e);
pmx_unload();

Description:

  • Free engine resources by invoking the engine's destroy method.
  • Use pmx_unload before terminating the program.
Note
It is highly recommended that you stabilize memory usage and overall performance by retiring a PMX_ENGINE after 2048 email messages have been scanned. The embedded Perl interpreter dynamically allocates memory during the scanning process, and can be slow to release it. This is especially important if very large email messages are regularly scanned.