MCPcopy Create free account
hub / github.com/changkun/modern-cpp-tutorial / ~B

Method ~B

code/5/5.3.cpp:17–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15public:
16 std::shared_ptr<A> pointer;
17 ~B() {
18 std::cout << "B 被销毁" << std::endl;
19 }
20};
21int main() {
22 std::shared_ptr<A> a = std::make_shared<A>();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected