diff --git a/internal/atlas/image.go b/internal/atlas/image.go index b16f1d500..be134b5e8 100644 --- a/internal/atlas/image.go +++ b/internal/atlas/image.go @@ -81,6 +81,7 @@ func (t *temporaryPixels) resetAtFrameEnd() { // Let the pixels GCed if this is not used for a while. if t.notFullyUsedTime == maxNotFullyUsedTime && len(t.pixels) > 0 { t.pixels = nil + t.notFullyUsedTime = 0 } // Reset the position and reuse the allocated bytes. diff --git a/internal/graphics/vertex.go b/internal/graphics/vertex.go index 06ccc3274..8ea28fa5f 100644 --- a/internal/graphics/vertex.go +++ b/internal/graphics/vertex.go @@ -108,6 +108,7 @@ func (v *verticesBackend) lockAndReset(f func() error) error { if v.notFullyUsedTime == maxNotFullyUsedTime && len(v.backend) > 0 { v.backend = nil + v.notFullyUsedTime = 0 } v.pos = 0