Fix image caching

This commit is contained in:
David Vogel 2022-08-08 12:36:55 +02:00
parent baea6292f1
commit 6f2be8486e

View File

@ -79,11 +79,11 @@ func (it *imageTile) GetImage() (*image.RGBA, error) {
it.image = imgRGBA
// Free the image after some time
// Free the image after some time.
go func() {
for it.imageUsedFlag {
time.Sleep(1 * time.Second)
it.imageUsedFlag = false
time.Sleep(100 * time.Millisecond)
}
it.imageMutex.Lock()