Esempio n. 1
0
 /// <summary>
 /// Release the current window cursor.
 /// </summary>
 public void Release()
 {
     _byteWindow = null;
     try
     {
         InflaterCache.Instance.release(_inflater);
     }
     finally
     {
         _inflater = null;
     }
 }
Esempio n. 2
0
        private void Pin(PackFile pack, long position)
        {
            ByteWindow w = _byteWindow;

            if (w == null || !w.contains(pack, position))
            {
                // If memory is low, we may need what is in our window field to
                // be cleaned up by the GC during the get for the next window.
                // So we always clear it, even though we are just going to set
                // it again.
                //
                _byteWindow = null;
                _byteWindow = WindowCache.get(pack, position);
            }
        }
Esempio n. 3
0
 /// <summary>
 /// Release the current window cursor.
 /// </summary>
 public void Release()
 {
     _byteWindow = null;
     try
     {
         InflaterCache.Instance.release(_inflater);
     }
     finally
     {
         _inflater = null;
     }
 }
Esempio n. 4
0
 private void Pin(PackFile pack, long position)
 {
     ByteWindow w = _byteWindow;
     if (w == null || !w.contains(pack, position))
     {
         // If memory is low, we may need what is in our window field to
         // be cleaned up by the GC during the get for the next window.
         // So we always clear it, even though we are just going to set
         // it again.
         //
         _byteWindow = null;
         _byteWindow = WindowCache.get(pack, position);
     }
 }