Create an omapi_task in omapi_lib_init and destroy it in omapi_lib_destroy.
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).