clean the region cache

This commit is contained in:
lionsoul2014 2026-04-29 16:04:20 +08:00
parent 787bd7ae07
commit 19a8816827
4 changed files with 7 additions and 0 deletions

View File

@ -93,6 +93,8 @@ func Bench(sCmd string) {
defer handle.Close()
var rgCache = xdb.NewRegionCache()
defer rgCache.Clean()
var count, errCount, tStart = 0, 0, time.Now()
slog.Info("Bench start", "xdbPath", dbFile, "srcPath", srcFile)
_, _, iErr := xdb.IterateSegments(handle, false, func(l string) {

View File

@ -416,4 +416,5 @@ func (e *Editor) SaveToFile(dstFile string) error {
func (e *Editor) Close() {
_ = e.srcHandle.Close()
e.rgCache.Clean()
}

View File

@ -414,5 +414,7 @@ func (m *Maker) End() error {
return err
}
m.regionCache.Clean()
return nil
}

View File

@ -156,5 +156,7 @@ func (p *Processor) End() error {
return err
}
p.rgCache.Clean()
return nil
}