fix(windows): 修复TTS插件回调触发空指针和资源泄漏问题 - #648
Open
todo2088 wants to merge 4 commits into
Open
Conversation
重构了Windows平台TTS插件的完成回调逻辑,使用临界区保护speakResult指针,统一管理等待句柄的注册与反注册,避免重复注册导致的资源泄漏以及回调访问已销毁对象引发的崩溃。同时在stop方法中主动完成未完成的语音合成任务,防止Dart侧永久等待。
仅更新应用版本号,进行版本迭代
1. 修复MediaEnded回调中未重置speakResult导致的内存访问问题 2. 增加pVoice空指针检查,避免调用无效语音实例崩溃 3. 优化COM初始化逻辑,兼容已初始化COM的线程环境 4. 修复语音枚举流程中的资源泄漏和错误处理逻辑 5. 完善停止、暂停、继续播放等操作的空指针安全检查
仅更新了pubspec.yaml中的版本号,发布小版本更新
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
重构了Windows平台TTS插件的完成回调逻辑,使用临界区保护speakResult指针,统一管理等待句柄的注册与反注册,避免重复注册导致的资源泄漏以及回调访问已销毁对象引发的崩溃。同时在stop方法中主动完成未完成的语音合成任务,防止Dart侧永久等待。