Fix memory leak and pass ownership of py editor widgets to C++