mirror of
https://github.com/restic/restic.git
synced 2025-02-02 20:46:57 +00:00
Merge pull request #4301 from MichaelEischer/less-restore-memory
restore: slightly reduce memory usage while restoring files
This commit is contained in:
commit
6dc2324d2e
1 changed files with 2 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue