Skip to content

Commit

Permalink
Try disposing the pixmap too
Browse files Browse the repository at this point in the history
  • Loading branch information
merlinorg committed May 31, 2022
1 parent 62324b5 commit 88f9196
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ android {
}
}

compileSdkVersion 30
compileSdkVersion 29
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
Expand All @@ -37,7 +37,7 @@ android {
defaultConfig {
applicationId "org.merlin.tertis"
minSdkVersion 26
targetSdkVersion 30
targetSdkVersion 29
versionCode 1
versionName "1.0"
}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ buildscript {
allprojects {
apply plugin: "eclipse"

version = '1.3'
version = '1.4'
ext {
appName = "run"
gdxVersion = '1.11.0'
Expand Down
4 changes: 3 additions & 1 deletion core/src/org/merlin/tertis/Tertis.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import com.badlogic.gdx.Application.ApplicationType
import com.badlogic.gdx.audio.Sound
import com.badlogic.gdx.graphics.Pixmap.Format
import com.badlogic.gdx.graphics.g2d.PolygonSpriteBatch
import com.badlogic.gdx.graphics.glutils.PixmapTextureData
import com.badlogic.gdx.graphics.{Pixmap, Texture}
import com.badlogic.gdx.utils.ScreenUtils
import com.badlogic.gdx.{ApplicationAdapter, Gdx, Input}
Expand Down Expand Up @@ -130,6 +131,7 @@ object Tertis {
val pixel = new Pixmap(1, 1, Format.RGBA8888)
pixel.setColor(r, g, b, a)
pixel.fill()
garbage.add(new Texture(pixel))
val td = new PixmapTextureData(pixel, null, false, true)
garbage.add(new Texture(td))
}
}

0 comments on commit 88f9196

Please sign in to comment.