# Texture Disposal in Spine?

**URL:** <https://forums.solar2d.com/t/texture-disposal-in-spine/342321>\
**Category:** Spine\
**Created:** [December 8, 2016, 12:27am UTC](https://forums.solar2d.com/t/texture-disposal-in-spine/342321 "2016-12-08T00:27:06Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![rlowenstein](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/r/96bed5/32.png) [@rlowenstein](https://forums.solar2d.com/u/rlowenstein)\
**Post date:** [December 8, 2016, 12:27am UTC](https://forums.solar2d.com/t/texture-disposal-in-spine/342321/1 "2016-12-08T00:27:06Z")

</div>

Does anyone know how to dispose of a Spine texture once it’s been loaded in (like after a scene change)? &nbsp;The TextureAtlas:dispose() method in the lua runtime is incomplete…

---

<div class="post-metadata">

**Author:** ![kilopop](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/k/a88e4f/32.png) [@kilopop](https://forums.solar2d.com/u/kilopop)\
**Post date:** [December 8, 2016, 1:24am UTC](https://forums.solar2d.com/t/texture-disposal-in-spine/342321/2 "2016-12-08T01:24:15Z")

</div>

If you have placed the spine object in a display object then remove that as usual. Also need to remove the runtime eventListener that updates skeleton animations.

---

<div class="post-metadata">

**Author:** ![rlowenstein](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/r/96bed5/32.png) [@rlowenstein](https://forums.solar2d.com/u/rlowenstein)\
**Post date:** [December 8, 2016, 1:36am UTC](https://forums.solar2d.com/t/texture-disposal-in-spine/342321/3 "2016-12-08T01:36:07Z")

</div>

Hey that totally works! Do I need to worry about all of the Lua memory, or does that just get garbage collected eventually? Thanks!!!

---

<div class="post-metadata">

**Author:** ![kilopop](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/k/a88e4f/32.png) [@kilopop](https://forums.solar2d.com/u/kilopop)\
**Post date:** [December 8, 2016, 1:51am UTC](https://forums.solar2d.com/t/texture-disposal-in-spine/342321/4 "2016-12-08T01:51:06Z")

</div>

Depends how you’re dealing with your variables and tables. As for spine, as long as it is local to your scene everything from that is disposed on a new scene change. Spine does use a few globals though I’ve noticed.

---

<div class="post-metadata">

**Author:** ![rlowenstein](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/r/96bed5/32.png) [@rlowenstein](https://forums.solar2d.com/u/rlowenstein)\
**Post date:** [December 8, 2016, 2:03am UTC](https://forums.solar2d.com/t/texture-disposal-in-spine/342321/5 "2016-12-08T02:03:45Z")

</div>

Thanks, kilopop!!

---

<div class="post-metadata">

**Author:** ![kilopop](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/k/a88e4f/32.png) [@kilopop](https://forums.solar2d.com/u/kilopop)\
**Post date:** [December 8, 2016, 1:24am UTC](https://forums.solar2d.com/t/texture-disposal-in-spine/342321/6 "2016-12-08T01:24:15Z")

</div>

If you have placed the spine object in a display object then remove that as usual. Also need to remove the runtime eventListener that updates skeleton animations.

---

<div class="post-metadata">

**Author:** ![rlowenstein](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/r/96bed5/32.png) [@rlowenstein](https://forums.solar2d.com/u/rlowenstein)\
**Post date:** [December 8, 2016, 1:36am UTC](https://forums.solar2d.com/t/texture-disposal-in-spine/342321/7 "2016-12-08T01:36:07Z")

</div>

Hey that totally works! Do I need to worry about all of the Lua memory, or does that just get garbage collected eventually? Thanks!!!

---

<div class="post-metadata">

**Author:** ![kilopop](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/k/a88e4f/32.png) [@kilopop](https://forums.solar2d.com/u/kilopop)\
**Post date:** [December 8, 2016, 1:51am UTC](https://forums.solar2d.com/t/texture-disposal-in-spine/342321/8 "2016-12-08T01:51:06Z")

</div>

Depends how you’re dealing with your variables and tables. As for spine, as long as it is local to your scene everything from that is disposed on a new scene change. Spine does use a few globals though I’ve noticed.

---

<div class="post-metadata">

**Author:** ![rlowenstein](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/r/96bed5/32.png) [@rlowenstein](https://forums.solar2d.com/u/rlowenstein)\
**Post date:** [December 8, 2016, 2:03am UTC](https://forums.solar2d.com/t/texture-disposal-in-spine/342321/9 "2016-12-08T02:03:45Z")

</div>

Thanks, kilopop!!
