Merge pull request #1004 from rppendya/rppendya_list_release
Releasing the list items when list destructor is called
Этот коммит содержится в:
Коммит
0bc51375f3
@ -97,11 +97,17 @@ static void opal_list_construct(opal_list_t *list)
|
||||
|
||||
|
||||
/*
|
||||
* Reset all the pointers to be NULL -- do not actually destroy
|
||||
* anything.
|
||||
* Release the list items in the list.
|
||||
* Reset list pointers to be NULL
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -452,6 +452,11 @@ void memheap_oob_destruct(void)
|
||||
PMPI_Request_free(&r->recv_req);
|
||||
}
|
||||
|
||||
/*clear these list object as they don't belong here */
|
||||
while (NULL != opal_list_remove_first(&memheap_oob.req_list)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
OBJ_DESTRUCT(&memheap_oob.req_list);
|
||||
OBJ_DESTRUCT(&memheap_oob.lck);
|
||||
OBJ_DESTRUCT(&memheap_oob.cond);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user