MCPcopy Create free account
hub / github.com/EricPengShuai/Interview / ~MemoryBlock

Method ~MemoryBlock

STL/move.cpp:21–34  ·  view source on GitHub ↗

Destructor.

Source from the content-addressed store, hash-verified

19
20 // Destructor.
21 ~MemoryBlock()
22 {
23 std::cout << "In ~MemoryBlock(). length = "
24 << _length << ".";
25
26 if (_data != nullptr)
27 {
28 std::cout << " Deleting resource.";
29 // Delete the resource.
30 delete[] _data;
31 }
32
33 std::cout << std::endl;
34 }
35
36 // Copy constructor.
37 MemoryBlock(const MemoryBlock& other)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected