1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-23 00:07:25 +00:00

restore: slightly reduce memory usage while restoring files

The information which target files are contained in a pack file is no
longer necessary after processing a pack.
This commit is contained in:
Michael Eischer 2023-04-23 11:33:21 +02:00
parent 22562d2132
commit 94cbc6392d

View file

@ -181,6 +181,8 @@ func (r *fileRestorer) restoreFiles(ctx context.Context) error {
wg.Go(func() error {
for _, id := range packOrder {
pack := packs[id]
// allow garbage collection of packInfo
delete(packs, id)
select {
case <-ctx.Done():
return ctx.Err()