# Remove event listener

**URL:** <https://forum.kirupa.com/t/remove-event-listener/294457>\
**Category:** Uncategorized\
**Created:** [August 14, 2009, 8:04am UTC](https://forum.kirupa.com/t/remove-event-listener/294457 "2009-08-14T08:04:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![werehunt](https://avatars.discourse-cdn.com/v4/letter/w/b782af/32.png) [@werehunt](https://forum.kirupa.com/u/werehunt)\
**Post date:** [August 14, 2009, 8:04am UTC](https://forum.kirupa.com/t/remove-event-listener/294457/1 "2009-08-14T08:04:35Z")

</div>

do you have to ask before you try to remove some listener:

```auto
**if(hasEventListener(Event.ENTER_FRAME)) {**
   removeEventListener(Event.ENTER_FRAME, panThumbs);
}

```

or you can just say somewhere in your code:

```auto
removeEventListener(Event.ENTER_FRAME, panThumbs);

```

and if it has listener at that moment it will be removed and if it hasnt no harm, right?

or not? 😃
