1
1

Merge pull request #1004 from rppendya/rppendya_list_release

Releasing the list items when list destructor is called
Этот коммит содержится в:
rhc54 2015-10-21 14:34:19 -07:00
родитель 386991d590 720fa860ee
Коммит 0bc51375f3
2 изменённых файлов: 13 добавлений и 2 удалений

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

@ -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);
} }

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

@ -452,6 +452,11 @@ void memheap_oob_destruct(void)
PMPI_Request_free(&r->recv_req); 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.req_list);
OBJ_DESTRUCT(&memheap_oob.lck); OBJ_DESTRUCT(&memheap_oob.lck);
OBJ_DESTRUCT(&memheap_oob.cond); OBJ_DESTRUCT(&memheap_oob.cond);