We use the following procedure
proc deletePtr {ptrClass} { set name [lindex [split [$ptrClass cget -this] _] 2] delete_$name [$ptrClass cget -this] rename $ptrClass "" } #