cleanup
This commit is contained in:
+2
-3
@@ -1,4 +1,4 @@
|
||||
#include "nodes/SimpleNode.h" // Путь изменен
|
||||
#include "nodes/SimpleNode.h"
|
||||
#include <iostream>
|
||||
|
||||
void printTree(const NodePtr& startNode, int indent = 0) {
|
||||
@@ -14,7 +14,6 @@ void printTree(const NodePtr& startNode, int indent = 0) {
|
||||
int main() {
|
||||
std::cout << "Entering main scope...\n\n";
|
||||
|
||||
// Начало новой области видимости
|
||||
{
|
||||
auto root = std::make_shared<SimpleNode>("Root");
|
||||
auto child2 = std::make_shared<SimpleNode>("Child2");
|
||||
@@ -43,7 +42,7 @@ int main() {
|
||||
std::cout << "\nTree after scope out:\n";
|
||||
printTree(root);
|
||||
|
||||
} // <--- КОНЕЦ ОБЛАСТИ ВИДИМОСТИ
|
||||
}
|
||||
|
||||
std::cout << "\nExited main scope. All smart pointers destroyed.\n";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user