缓存文件列表关闭时也清除内存缓存

This commit is contained in:
刘祥超
2021-08-29 08:59:32 +08:00
parent 417e10970a
commit dfb0e60acc

View File

@@ -360,6 +360,8 @@ func (this *FileList) OnRemove(f func(item *Item)) {
func (this *FileList) Close() error { func (this *FileList) Close() error {
this.isClosed = true this.isClosed = true
this.memoryCache.Destroy()
if this.db != nil { if this.db != nil {
_ = this.existsByHashStmt.Close() _ = this.existsByHashStmt.Close()
_ = this.insertStmt.Close() _ = this.insertStmt.Close()