Is this change intentional? Would this not create a memory leak if this object is not deleted here?