强制所有脚本进行dispose(如发生提前释放问题请自行修复) (#2292)

* 强制dispose

* 强制dispose(版本号更新)
This commit is contained in:
躁动的氨气
2025-11-02 13:27:59 +08:00
committed by GitHub
parent d89adc890e
commit 204825f37d
125 changed files with 996 additions and 532 deletions

View File

@@ -21,6 +21,7 @@ const paimonMenuRo = RecognitionObject.TemplateMatch(
const isInMainUI = () => {
let captureRegion = captureGameRegion();
let res = captureRegion.Find(paimonMenuRo);
captureRegion.dispose();
return !res.isEmpty();
};
@@ -85,6 +86,7 @@ const isInMainUI = () => {
// 捕获并识别
const region = captureGameRegion();
region.Find(ro);
region.dispose();
// 2000毫秒后移除绘制的边框
setTimeout(() => {
@@ -109,6 +111,7 @@ const isInMainUI = () => {
// 截图识别
let captureRegion = captureGameRegion();
let OCRresults = await captureRegion.findMulti(locationOcrRo);
captureRegion.dispose();
return OCRresults;
} catch (error) {
@@ -543,6 +546,7 @@ const isInMainUI = () => {
return () => {
let captureRegion = captureGameRegion();
let res = captureRegion.Find(paimonMenuRo);
captureRegion.dispose();
return !res.isEmpty();
};
},

View File

@@ -1,7 +1,7 @@
{
"manifest_version": 1,
"name": "自动剧情加载器",
"version": "1.4",
"version": "1.5",
"tags": ["剧情","任务"],
"description": "剧情自动加载器一键挂机过剧情:自动寻路、对话、战斗(需任务脚本支持),脚本拖进调度器就能跑,仅提供技术框架,完全体须搭配需任务脚本使用,详情见说明文档",
"authors": [