Adding the custom finalizer to the object.