2
2
mirror of https://github.com/octoleo/restic.git synced 2024-05-29 07:00:49 +00:00

Merge pull request #4301 from MichaelEischer/less-restore-memory

restore: slightly reduce memory usage while restoring files
This commit is contained in:
Michael Eischer 2023-04-30 16:07:43 +02:00 committed by GitHub
commit 6dc2324d2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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()