Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2026-02-11 23:44:12 +08:00
parent b5c652b821
commit 3f82df40e3
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 18 additions and 13 deletions

View file

@ -136,7 +136,8 @@ func closeDatabase() {
logging.LogErrorf("close database failed: %s", err)
}
debug.FreeOSMemory()
runtime.GC() // 没有这句的话文件句柄不会释放,后面就无法删除文件
db = nil
runtime.GC()
return
}