Use shared_ptr for gui objects too