Answered: Correct way to dispose of / delete a load mask?

So I have been playing with loading masks for my application and currently I am using .hide(), but it seems like the loading mask object will just remain attached to the associated component and accumulate over time.

I am unsure of how I should be disposing of loading masks, or even if I need to dispose of them in the first place.

There is the potential for a leak here if you aren't careful. Hiding a loadmask won't destroy it, so if you keep creating and hiding loadmasks they'll leak. This type of leak is quite common with menus too, where hiding is often automatic but destruction isn't.

There is the potential for a leak here if you aren't careful. Hiding a loadmask won't destroy it, so if you keep creating and hiding loadmasks they'll leak. This type of leak is quite common with menus too, where hiding is often automatic but destruction isn't.