mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-13 20:42:07 +01:00
parent
f37ebe549b
commit
d2a9e5b1e8
@ -813,8 +813,8 @@ func TestIteratingImagesToPutOnSourceBackend(t *testing.T) {
|
|||||||
func TestGC(t *testing.T) {
|
func TestGC(t *testing.T) {
|
||||||
img := atlas.NewImage(16, 16, atlas.ImageTypeRegular)
|
img := atlas.NewImage(16, 16, atlas.ImageTypeRegular)
|
||||||
img.WritePixels(make([]byte, 4*16*16), image.Rect(0, 0, 16, 16))
|
img.WritePixels(make([]byte, 4*16*16), image.Rect(0, 0, 16, 16))
|
||||||
runtime.KeepAlive(img)
|
|
||||||
c0 := atlas.DeferredFuncCountForTesting()
|
c0 := atlas.DeferredFuncCountForTesting()
|
||||||
|
runtime.KeepAlive(img)
|
||||||
runtime.GC()
|
runtime.GC()
|
||||||
c1 := atlas.DeferredFuncCountForTesting()
|
c1 := atlas.DeferredFuncCountForTesting()
|
||||||
if got, want := c1, c0+1; got != want {
|
if got, want := c1, c0+1; got != want {
|
||||||
|
Loading…
Reference in New Issue
Block a user