olofson / audiality2

A realtime scripted modular audio engine for video games and musical applications.
http://audiality.org/
zlib License
79 stars 5 forks source link

Handle destructor callback issues with A2_interface #280

Open olofson opened 7 years ago

olofson commented 7 years ago

94/#204 introduce a potential issue with handle destructor callbacks. For example, a2_BankDestructor() recursively calls a2_Release(), which now needs an A2_interface (rather than an A2_state) - but we don't know which A2_interface triggered the "release chain reaction" at this point!

This shouldn't be a problem as long as A2_interfaces calls are not expected to be reentrant per state, so it should be safe to just use the "master" interface (st->interfaces->interface) for now, but this has to be dealt with when implementing thread safe A2_interfaces.