增加本地Cv2.ImShow播放的动态增加、移除的支持

This commit is contained in:
2025-12-26 17:28:07 +08:00
parent 83ad6221a4
commit e98059fd30
5 changed files with 305 additions and 185 deletions

View File

@@ -36,8 +36,15 @@ public class FrameController
public void Unregister(string appId)
{
if (string.IsNullOrWhiteSpace(appId)) return;
// 1. 从需求配置中移除
_requirements.TryRemove(appId, out _);
_accumulators.TryRemove(appId, out _); // 同步清理,防止内存泄漏
// 2. 从积分累加器中移除(防止内存泄漏)
_accumulators.TryRemove(appId, out _);
Console.WriteLine($"[Scheduler] 已从调度中心彻底移除 AppId: {appId}");
}
// ---------------------------------------------------------