properly destroy objects