test: Fix a potential use-after-free when using stopAsync
Since we're now using an async stop function, we might be freeing the buffer while it's still being used. Instead, release it automatically after the instance itself has been released since we're guaranteed to have joined all threads at this point