# Memory Leaks - Object References

**URL:** <https://forum.kirupa.com/t/memory-leaks-object-references/332444>\
**Category:** flash\
**Created:** [June 10, 2014, 9:49am UTC](https://forum.kirupa.com/t/memory-leaks-object-references/332444 "2014-06-10T09:49:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DMB](https://avatars.discourse-cdn.com/v4/letter/d/b782af/32.png) [@DMB](https://forum.kirupa.com/u/DMB)\
**Post date:** [June 10, 2014, 9:49am UTC](https://forum.kirupa.com/t/memory-leaks-object-references/332444/1 "2014-06-10T09:49:01Z")

</div>

Recently I’ve noticed memory leak/s in my application and have been looking at ways to patch them, so far I’ve applied:

- Weak event listeners
- removeEventListener
- object = null

What I haven’t done yet is remove all references to objects, as currently I don’t understand enough about object references.

Q1. What counts as a reference? Can anyone provide examples, perhaps in the context of a dynamic movieclip?

Q2. My variables are all globally declared and then given values in functions, should I be nullifying them as well?

Q3. Do I also have to remove and nullify all the children of objects?
