mirror of
https://gitee.com/dgflash/oops-plugin-framework.git
synced 2026-05-07 01:01:09 +08:00
Zip格式配置表,加载完缓存Json数据后自动释放资源
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/** 清理所有数据 */
|
||||
|
||||
Reference in New Issue
Block a user