IAssetLoader.ReleaseFont(string, int) Method
Definition¶
Namespace: Brine2D.Assets
Decrements the direct-load reference count for the given font. Each call to GetOrLoadFontAsync(string, int, CancellationToken) adds one direct reference; call this method once per load to release it. The font is unloaded and its resources are freed only when both the direct count and all manifest references reach zero. Has no effect if the font was only loaded via a manifest.
bool ReleaseFont(string path, int size);
Parameters¶
path System.String
size System.Int32
Returns¶
System.Boolean
true if the asset's total reference count reached zero and it was freed;
false if still referenced or not a direct load.