BWiz
01-23-2010, 08:08 PM
Hi Guys,
I'm working on a linked list for one of my projects, and I just had a quick question about my dequeue function:
void LinkedList<E>::dequeue() {
node<E>* pointer = this->firstObject;
this->firstObject = this->firstObject->next;
delete pointer;
}
Using the above lines of code, I will actually remove (what was) the first item in the queue from the memory, freeing up space right?
Thanks in advice,
BWiz.
I'm working on a linked list for one of my projects, and I just had a quick question about my dequeue function:
void LinkedList<E>::dequeue() {
node<E>* pointer = this->firstObject;
this->firstObject = this->firstObject->next;
delete pointer;
}
Using the above lines of code, I will actually remove (what was) the first item in the queue from the memory, freeing up space right?
Thanks in advice,
BWiz.