directly. note whether memory context is internal to the library so it can be destroyed by omapi_lib_destroy. destroy the handle table. set destroyed pointers to null. require omapi_lib_init only be called once (without omapi_lib_destroy).