implement CreateNewObjectEx, cleanup