mirror of
https://github.com/krahets/hello-algo.git
synced 2026-04-05 03:30:30 +08:00
build
This commit is contained in:
@@ -470,7 +470,7 @@ comments: true
|
||||
|
||||
/* 析构方法 */
|
||||
~LinkedListDeque() {
|
||||
// 释放内存
|
||||
// 遍历链表删除结点,释放内存
|
||||
DoublyListNode *pre, *cur = front;
|
||||
while (cur != nullptr) {
|
||||
pre = cur;
|
||||
|
||||
@@ -362,8 +362,8 @@ comments: true
|
||||
}
|
||||
|
||||
~LinkedListQueue() {
|
||||
delete front;
|
||||
delete rear;
|
||||
// 遍历链表删除结点,释放内存
|
||||
freeMemoryLinkedList(front);
|
||||
}
|
||||
|
||||
/* 获取队列的长度 */
|
||||
|
||||
@@ -353,6 +353,7 @@ comments: true
|
||||
}
|
||||
|
||||
~LinkedListStack() {
|
||||
// 遍历链表删除结点,释放内存
|
||||
freeMemoryLinkedList(stackTop);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user