Memory Leaks - Object References

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?