remove references when objects are killed