5.1.2 Delete

Again, because a struct _Stack contains a list, both the list and the stack structure need to be deallocated.

void Stack_delete(struct Stack *pStack)
{
  List_delete(((struct _Stack *)pStack)->pList);
  free(pStack);
}



Copyright © 2006-10-23 by Tak Auyeung