mirror of
https://github.com/changkun/modern-cpp-tutorial.git
synced 2025-12-17 04:34:40 +03:00
@@ -18,14 +18,14 @@ class A {
|
||||
public:
|
||||
std::shared_ptr<B> pointer;
|
||||
~A() {
|
||||
std::cout << "A was destroied" << std::endl;
|
||||
std::cout << "A was destroyed" << std::endl;
|
||||
}
|
||||
};
|
||||
class B {
|
||||
public:
|
||||
std::shared_ptr<A> pointer;
|
||||
~B() {
|
||||
std::cout << "B was destroied" << std::endl;
|
||||
std::cout << "B was destroyed" << std::endl;
|
||||
}
|
||||
};
|
||||
int main() {
|
||||
|
||||
Reference in New Issue
Block a user