1
1

Releasing the list items when list destructor is called

Этот коммит содержится в:
Raghavendra Pendyala 2015-10-09 10:49:44 -07:00
родитель 606c2d227d
Коммит 7579ae3086

Просмотреть файл

@ -97,11 +97,17 @@ static void opal_list_construct(opal_list_t *list)
/* /*
* Reset all the pointers to be NULL -- do not actually destroy * Release the list items in the list.
* anything. * Reset list pointers to be NULL
*/ */
static void opal_list_destruct(opal_list_t *list) static void opal_list_destruct(opal_list_t *list)
{ {
opal_list_item_t *it;
while (NULL != (it = opal_list_remove_first(list))) {
OBJ_RELEASE(it);
}
opal_list_construct(list); opal_list_construct(list);
} }