Website Summary Files Commits Branches @commit @diff @stats
path: root / Smart_pointers / 1. uniqe_ptr.cpp
diff options
context:
space:
mode:
1 files changed, 1 insertions, 1 deletions
-rw-r--r--Smart_pointers/1. uniqe_ptr.cpp2
diff --git a/Smart_pointers/1. uniqe_ptr.cpp b/Smart_pointers/1. uniqe_ptr.cpp
index 1b2f9eb..5459c63 100644
--- a/Smart_pointers/1. uniqe_ptr.cpp
+++ b/Smart_pointers/1. uniqe_ptr.cpp
@@ -38,7 +38,7 @@ int main()
Test* obj = smart_pointer_1.get(); //От тук иматаме достъп до паметта, към която сочи пойнтера.
//delete obj; // Това не трябва да се прави! smart_pointer_1 не знае, че паметта е освободена и ще се опита да я освободи, което ще доведе до грешка!
- } //Test (Паметта се освобождава сама)
+ } // Detructor (Паметта се освобождава сама, след премахването на пойнтера)
{