What makes applets swell up?

A few days ago I noticed an applet with a size of over 16 Mb.
I recompiled it (400K) and it works fine.

Just now I saw another applet bloated to 5 Mb.

What’s going on?

Hi.

It’s possibly the values of properties, globals, and run-handler variables, which persist (ie. are stored back into the script file) after the script’s run.

As Nigel mentioned it’s persistent values who are never deleted and are overwritten, pretty much like memory leaks but in it’s resources. To avoid it you could use instantiated objects instead of class objects if the data doesn’t need to be persistent between each run but only need properties for its scope and inheritance.