Fixed the revert query GC problems

the GC thread can't delete Qt objects so we need to ensure they are deleted somewhere else, destructor just throw in case there is a leak