Destroying a queue

AcecA

Homework Statement

All I need is an explanation as to why the algorithm I've been given doesn't destroy the queue properly. When I use the code below, and I check if q is NULL or not, it says it isn't, and I'd like to know why. Thanks :)

Homework Equations

None, this is computer science.
Language is C with some C++ conventions, by the way

The Attempt at a Solution

Code:
typedef int Element;

struct _Queue {
Element *elts;
int capacity;
int count;
};

typedef _Queue* Queue;

void DestroyQueue(Queue q)
{
delete[] q->elts;
q->elts = NULL;
q->count = 0;
delete q;
q = NULL;
}

Mentor

Homework Statement

All I need is an explanation as to why the algorithm I've been given doesn't destroy the queue properly. When I use the code below, and I check if q is NULL or not, it says it isn't, and I'd like to know why. Thanks :)

Homework Equations

None, this is computer science.
Language is C with some C++ conventions, by the way

The Attempt at a Solution

Code:
typedef int Element;

struct _Queue {
Element *elts;
int capacity;
int count;
};

typedef _Queue* Queue;

void DestroyQueue(Queue q)
{
delete[] q->elts;
q->elts = NULL;
}