IAssetLoader.ReleaseMusic(string) Method
Definition¶
Namespace: Brine2D.Assets
Decrements the direct-load reference count for the given music. Each call to GetOrLoadMusicAsync(string, CancellationToken) adds one direct reference; call this method once per load to release it. The music is unloaded and audio resources are freed only when both the direct count and all manifest references reach zero. Has no effect if the music was only loaded via a manifest.
bool ReleaseMusic(string path);
Parameters¶
path System.String
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.