Exemplo n.º 1
0
        /// <summary>
        /// Handes the OnRemove-event from the cache.
        /// </summary>
        /// <param name="image"></param>
        private void OnRemove(Image2D image)
        { // dispose of the image after it is removed from the cache.
            _nativeImageCache.Release(image.NativeImage);
            image.NativeImage = null;

            OsmSharp.Logging.Log.TraceEvent("LayerMBTile", Logging.TraceEventType.Information, "OnRemove: {0}", _cache.Count);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Handes the OnRemove-event from the cache.
 /// </summary>
 /// <param name="image"></param>
 private void OnRemove(Image2D image)
 { // dispose of the image after it is removed from the cache.
     try
     {
         _nativeImageCache.Release(image.NativeImage);
         image.NativeImage = null;
     }
     catch (Exception ex)
     { // don't worry about exceptions here.
         OsmSharp.Logging.Log.TraceEvent("LayerTile", Logging.TraceEventType.Error, ex.Message);
     }
 }