optimization for GC

This commit is contained in:
Andy Pan 2018-07-15 00:57:32 +08:00
parent 813cc218fe
commit d77f01cf9a
2 changed files with 2 additions and 0 deletions

View File

@ -148,6 +148,7 @@ func (p *Pool) Release() error {
for i := range p.workers { for i := range p.workers {
p.workers[i] = nil p.workers[i] = nil
} }
p.workers = nil
}) })
return nil return nil
} }

View File

@ -153,6 +153,7 @@ func (p *PoolWithFunc) Release() error {
for i := range p.workers { for i := range p.workers {
p.workers[i] = nil p.workers[i] = nil
} }
p.workers = nil
}) })
return nil return nil
} }