Zip格式配置表,加载完缓存Json数据后自动释放资源

This commit is contained in:
dgflash
2025-09-15 21:41:46 +08:00
parent 6d46a6b67e
commit a864b3395e
2 changed files with 2 additions and 2 deletions

View File

@@ -126,7 +126,7 @@ oops.log.table(object);
* 打印标准日志
* @param msg 日志消息
*/
trace(msg: any, color: string = "#000000") {
trace(msg: any, color: string = "#FFFFFF") {
this.print(LogType.Trace, msg, color);
}

View File

@@ -70,6 +70,7 @@ export class JsonUtil {
zipNames.forEach(name => {
data.set(name, ZipLoader.getJson(pathZip, `${name}.json`));
});
ZipLoader.release(pathZip);
resolve();
}
else {
@@ -96,7 +97,6 @@ export class JsonUtil {
*/
static release(name: string) {
data.delete(name);
if (this.zip) ZipLoader.release(pathZip);
}
/** 清理所有数据 */