It's interesting to note that even the variable "c" in my example above is properly destroyed with execfile('test.py', {}).
What does this mean? I think this means that YES you can define classes inside a web2py controller without memory leaks, as long as there are no global (within the controller, i.e. foo.py) instances of Foo.