mirror of
https://github.com/krahets/hello-algo.git
synced 2026-02-03 19:03:42 +08:00
Add destructors to the C++ codes.
This commit is contained in:
@@ -78,5 +78,8 @@ int main() {
|
||||
bool empty = stack->empty();
|
||||
cout << "栈是否为空 = " << empty << endl;
|
||||
|
||||
// 释放内存
|
||||
delete stack;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user