mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-26 18:52:44 +01:00
shareable: Bug fix: Node-leak when extending a page
This is very rare and not so serious I think, but is still a bug.
This commit is contained in:
parent
0bf911905a
commit
0dcb53d290
@ -54,6 +54,7 @@ func (b *backend) TryAlloc(width, height int) (*packing.Node, bool) {
|
|||||||
}
|
}
|
||||||
nExtended++
|
nExtended++
|
||||||
if n := page.Alloc(width, height); n != nil {
|
if n := page.Alloc(width, height); n != nil {
|
||||||
|
page.Free(n)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user