Releasing the list items when list destructor is called
Этот коммит содержится в:
родитель
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user