Changed to use the delete keyword so that objects iterated by the findConstructorName logic is not altered