Do I need to release an instance after it plays to its end?

I have a simple timeline event that plays to a sustain point and holds a loop there. Then I call KeyOff and the event runs for another second or so and plays an “ending” sound and the event stops, as shown by the ‘stopped’ indication in FMOD Studio.

Do I need to call instance.release in this case, or does it release automatically after it has stopped as OneShots are said to do?

Thank you for your help!

Hi,

From our docs:
“Generally it is a best practice to release event instances immediately after calling Studio::EventInstance::start, unless you want to play the event instance multiple times or explicitly stop it and start it again later. It is possible to interact with the instance after falling release() , however if the sound has stopped ERR_INVALID_HANDLE will be returned.”

FMOD Engine | Studio API Reference - EventInstance::release
Hope this helps!