remove refobject based objects and dynamic casting from discard queue