Exemple #1
0
 protected void DisposeCache()
 {
     try
     {
         if (_cache != null)
         {
             lock (s_dataLock)
             {
                 s_cacheNeedInit = true;
                 _cache.Dispose();
                 _cache = null;
             }
         }
         if (_logs)
         {
             LogInfo("Disposed", null);
         }
     }
     catch (Exception exc)
     {
         LogError(exc, null);
     }
     finally
     {
     }
 }
Exemple #2
0
 private void OnAppDomainUnload(object unusedObject, EventArgs unusedEventArgs)
 {
     try
     {
         System.Threading.Thread.GetDomain().DomainUnload -= LegacyProvider.s_onAppDomainUnload;
         if (_cache != null)
         {
             lock (s_dataLock)
             {
                 s_cacheNeedInit = true;
                 _cache.Dispose();
                 _cache = null;
             }
         }
         if (_logs)
         {
             NCacheLog.Info(" disposed");
         }
     }
     catch (Exception exc)
     {
         RaiseException(exc);
     }
     finally
     {
     }
 }