diff options
Update 2. shared_ptr.cpp
1 files changed, 1 insertions, 1 deletions
| -rw-r--r-- | Smart_pointers/2. shared_ptr.cpp | 2 |
diff --git a/Smart_pointers/2. shared_ptr.cpp b/Smart_pointers/2. shared_ptr.cpp index c8b1cd3..b8437a8 100644 --- a/Smart_pointers/2. shared_ptr.cpp +++ b/Smart_pointers/2. shared_ptr.cpp @@ -34,7 +34,7 @@ int main() shared_ptr<Test> smart_pointer_2(smart_pointer_1); - cout << smart_pointer_1.get() << endl; //За разлика от uniqe_ptr тук smart_pointer_1 ПРОДЪЛЖАВА да сочи към обекта. + cout << smart_pointer_1.get() << endl; //За разлика от uniqe_ptr, тук smart_pointer_1 ПРОДЪЛЖАВА да сочи към обекта. cout << smart_pointer_2.use_count() << endl; //може да видим колко пойнтера са насочени към обекта. // Обектът ще се изтрие, когато пойнтерите станат 0. |
