mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-04-03 02:29:53 +08:00
Update doubly_linked_list.cpp
when remove an item , should free the item memory
This commit is contained in:
@@ -61,6 +61,7 @@ void double_linked_list::remove(int x) {
|
||||
t->prev->next = t->next;
|
||||
t->next->prev = t->prev;
|
||||
}
|
||||
delete t;
|
||||
}
|
||||
|
||||
void double_linked_list::search(int x) {
|
||||
|
||||
Reference in New Issue
Block a user