You are reading a single comment by @wagnerf42 and its replies. Click here to read the full conversation.
  • yeah that's what i thought. if i declare a global "street" variable, set it in the menu handler and use setInterval in the main to detect for the variable being set then it effectively frees the menu's memory. however i expected it to be also true if using a setTimeout in the handler itself since i thought the timeout's function would not be associated with the menu (the menu's handler registers the timeout and completes) and this is not the case.

    so i have the setInterval workaround which is fine, i'm not stuck but somehow it still don't get why the garbage collector is not freeing the memory if i use a timeout.

  • still don't get why the garbage collector is not freeing the memory if i use a timeout

    can you show the code with timeout and where would you expect the memory to be freed?

About

Avatar for wagnerf42 @wagnerf42 started