5 Replies Latest reply on Jan 20, 2017 12:51 PM by ClayUUID

    Does An AddEventListener Still Exist If It's Created Inside A Function?

    rs14smith

      If I create an addEventListener for a variable that I create inside a function, do I need to worry about removing that addEventListener when I come out of that function?

       

      Say I create a function shows job is just to caculate some math, and inside that function I create a variable and create a addEventListener for that variable, and then after solving the math, the program comes out of the function and doesn't use the function until another time in the future. Does that addEventListener still exist in the program, or does Animate CC automatically clean up that addEventListener for me and I do not have to worry about using the removeEventListener function?

       

      Thanks