Add warnings about disposing from memory
This commit is contained in:
@@ -141,6 +141,8 @@
|
|||||||
|
|
||||||
(defmacro sound
|
(defmacro sound
|
||||||
"Returns a [Sound](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/audio/Sound.html).
|
"Returns a [Sound](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/audio/Sound.html).
|
||||||
|
When no longer needed, you must call `(sound! object :dispose)` to free it from
|
||||||
|
memory.
|
||||||
|
|
||||||
(sound \"playerhurt.wav\")
|
(sound \"playerhurt.wav\")
|
||||||
(sound \"playerhurt.wav\" :play)"
|
(sound \"playerhurt.wav\" :play)"
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
(defmacro pixmap
|
(defmacro pixmap
|
||||||
"Returns a [Pixmap](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/Pixmap.html).
|
"Returns a [Pixmap](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/Pixmap.html).
|
||||||
|
When no longer needed, you must call `(pixmap! object :dispose)` to free it from
|
||||||
|
memory.
|
||||||
|
|
||||||
(pixmap \"image.png\")"
|
(pixmap \"image.png\")"
|
||||||
[& args]
|
[& args]
|
||||||
@@ -10,7 +12,9 @@
|
|||||||
`(Pixmap. ~@args)))
|
`(Pixmap. ~@args)))
|
||||||
|
|
||||||
(defmacro pixmap!
|
(defmacro pixmap!
|
||||||
"Calls a single method on a `pixmap`."
|
"Calls a single method on a `pixmap`.
|
||||||
|
|
||||||
|
(pixmap! object :dispose)"
|
||||||
[object k & options]
|
[object k & options]
|
||||||
`(u/call! ^Pixmap ~object ~k ~@options))
|
`(u/call! ^Pixmap ~object ~k ~@options))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user