nil out layers when dropping to allow for GC
This commit is contained in:
parent
212c346c21
commit
89b15c03cf
@ -50,6 +50,7 @@ func (ss *stateSnaps) addLayer() {
|
||||
}
|
||||
|
||||
func (ss *stateSnaps) dropLayer() {
|
||||
ss.layers[len(ss.layers)-1] = nil // allow it to be GCed
|
||||
ss.layers = ss.layers[:len(ss.layers)-1]
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user