You could use the SDK to write a plugin to do this, and not break minification. It'd also integrate more nicely with events.
I'm a bit skeptical of unloading objects - in many cases it won't reduce the peak memory usage, so won't help avoid out-of-memory crashes. What are you doing that requires this?
Ashley if I understand the meaning of your question correctly. I already wrote about this, I'm doing a space simulator. Because of that, the generated stars and gas giants did not look very cost-effective, I had to do their animation. For example, one animation of a gas planet has 150 frames, each frame has a 192 * 192 resolution. After simple calculations we learn that one animation will occupy 22 Mb (although it seems to me that it takes up more memory). At the moment I have 10 such animations, to the output of the game I'm going to increase this value 2-3 times. At the same time, no more than 6 animations are displayed, so others just take up memory. Initially, I was going to do an object for each animation and then unite them into a family, but it's very inconvenient. But I figured out how to download animations from project files. And now I'm thinking about how to unload them from memory