Apologies for bumping this, but I've just discovered this is completely unneeded so wanted to make sure the correct info is here for anyone who stumbles across it.
It's actually briefly mentioned in the docs that scripts implicitly extend Reference
. This also applies to inner classes, though. I just made sure of this by explicitly adding extends Object
to an inner class, and sure enough, leaks were detected on shutdown:
WARNING: cleanup: ObjectDB instances leaked at exit (run with --verbose for details).
At: core/object.cpp:2132.
So, to be clear, extends Reference
isn't normally needed.