In the C++ connector library, the terminate() method is defined in the GenGlobals class. Typical return codes used in terminate() are BON_SUCCESS and BON_FAIL.
Figure 76 shows a sample terminate() method for a C++ connector.
Figure 76. C++ terminate() method
int ExampleGenGlob::terminate() { // log off application and // release memory and other resources ... traceWrite(Tracing::LEVEL3, "terminate() completed.", 0); return BON_SUCCESS; }