FFImageLoading.Drawables.SelfDisposingBitmapDrawable.SetIsCached C# (CSharp) Method

SetIsCached() public method

This should only be called by caching entities. Increments or decrements the cache reference count. This count represents if the instance is cached by something and should not free its resources when no longer displayed.
public SetIsCached ( bool isCached ) : void
isCached bool If set to true is cached.
return void
        public void SetIsCached(bool isCached)
        {
            lock (monitor)
            {
                if (isCached)
                {
                    cache_ref_count++;
                }
                else {
                    cache_ref_count--;
                }
            }
            CheckState();
        }