proper handling of contained resources