public void Release() { if (pFactory != null) { ProtocolFactoryManager.UnRegisterProtocolFactory(pFactory); pFactory = null; } //if (libHandler != null) //{ // AppDomain.Unload(appDomain); //} }