FWIW, this is all done in "user space". The metaclass instance is attached to every instance that it creates. When all the instances go away, there are no more references to the metaclass, and it gets reclaimed. The destructor handles deleting the symbol table entries that were added, and that's that.
There is something to be said for not baking things into the language.
I like this trick though, it will help me with my seaside clone in java :)