Modified release functions to set the object to NULL.