Stack* _stack_new(size_t dataSize)
{
Stack* stack = (Stack*) safe_malloc(sizeof (Stack));
+ stack->array = _vector_new(dataSize);
_stack_init(stack, dataSize);
return stack;
}
void stack_destroy(Stack* stack)
{
- stack_clear(stack);
+ vector_destroy(stack->array);
safe_free(stack);
}