# How to removeEventListeners in modules required by Composer scene

**URL:** <https://forums.solar2d.com/t/how-to-removeeventlisteners-in-modules-required-by-composer-scene/324999>\
**Category:** Composer\
**Created:** [April 28, 2014, 11:58am UTC](https://forums.solar2d.com/t/how-to-removeeventlisteners-in-modules-required-by-composer-scene/324999 "2014-04-28T11:58:46Z")\
**Posts on this page:** 3\
**Page:** 1

<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:** [April 28, 2014, 11:58am UTC](https://forums.solar2d.com/t/how-to-removeeventlisteners-in-modules-required-by-composer-scene/324999/1 "2014-04-28T11:58:46Z")

</div>

We have 2 composer scenes that ping pong between each other on goto Scene A --\> B --\> A --\> B etc. This happens 24 times. Each time A or B is loaded it requires a new module which contains images which are inserted into scene A and B’s sceneGroup. That’s fine. the problem is when those modules add their own eventListeners. If these are not removed when sceneA gotos to a new sceneB etc, they remain in the CurrentStage adding around 1KB each time.

Tried running a function within the module to remove the listeners in there but the currentStage still lists them as persisting.

What is the best way deal with event Listeners in Composer. Specifically, how to remove event listeners created within modules required by composer scenes?

---

<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:** [April 29, 2014, 12:00am UTC](https://forums.solar2d.com/t/how-to-removeeventlisteners-in-modules-required-by-composer-scene/324999/2 "2014-04-29T00:00:07Z")

</div>

Solved. EventListeners were diposing as they should (given they were added to sceneGroup). Issue was due to groups in other libraries.

---

<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:** [April 29, 2014, 12:00am UTC](https://forums.solar2d.com/t/how-to-removeeventlisteners-in-modules-required-by-composer-scene/324999/3 "2014-04-29T00:00:07Z")

</div>

Solved. EventListeners were diposing as they should (given they were added to sceneGroup). Issue was due to groups in other libraries.
