Library initialization and termination methods

The InitializeLibrary and DestroyLibrary custom adapter methods are called to perform one-time initialization tasks and to clean up from these tasks.