To close the COM library gracefully on a thread, each successful call to CoInitialize or CoInitializeEx, including any call that returns S_FALSE, must be balanced by a corresponding call to CoUninitialize
I'm not really familiar with the wasapi crate development direction, but I think there should be a function such as fn deinitialize() for these safety purposes. What's your opinion?
As stated in docs:
I'm not really familiar with the
wasapi
crate development direction, but I think there should be a function such asfn deinitialize()
for these safety purposes. What's your opinion?https://github.com/HEnquist/wasapi-rs/blob/bf15059518796e19ee3d8a8e1d6d9fb096d37d7b/src/api.rs#L61-L68