mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-06 14:27:26 +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