mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-14 03:04:21 +01:00
🐛 Rebuilding the index caused a crash https://github.com/siyuan-note/siyuan/issues/17001
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
b5c652b821
commit
3f82df40e3
2 changed files with 18 additions and 13 deletions
|
|
@ -136,7 +136,8 @@ func closeDatabase() {
|
|||
logging.LogErrorf("close database failed: %s", err)
|
||||
}
|
||||
debug.FreeOSMemory()
|
||||
runtime.GC() // 没有这句的话文件句柄不会释放,后面就无法删除文件
|
||||
db = nil
|
||||
runtime.GC()
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue