list->remove (ul_oocbs)
item.g.r = remove(list.s.r, tag.i4.v)
This method retrieves an element, based upon the tag, and
removes it from the list.
list a pointer to the list (structure of type List)
tag the tag to be used to retrieve the corresponding
List element
This function returns:
a pointer to the item removed from the List
Use of this class requires the following header files:
list.h
Related functions:
create_List() the constructor for instances of the List class
C/C++ usage:
#include "list.h"
List *list;
int item;
int length;
void *ptr;
int tag;
ptr = (*list->remove)(list,tag);
if (ptr != (void *) NULL)
{
item = *ptr;
free(ptr);
}
Note:
The List class actually allocates space in which to store the
data item given to it for the "put" operation. It is a pointer
to this allocated space that is returned by this method.
Therefore the user of the List class must be sure to free
this pointer when finished with it, or else memory leaks will
result.