In a completely programmatic versioning related workflow, after resolving geometry related conflict, the version cannot be deleted immediately through the same process, even after releasing all the references tied to the version.
Version references will be held by any object that is opened off of the version. Make sure to release all the references prior calling the Delete method on the version.In VBA, use set <variable> = NothingIn .Net, call, GC.Collect followed by GC.WaitForPendingFinalizers method