The document matches terms related to memory management in C++ with their definitions. The terms are a heap, memory leak, inaccessible object, dangling pointer, destructor, and dynamic data. The heap is defined as the area of memory used for allocation and deallocation of dynamic data. A memory leak is the loss of available space when dynamic data is not deallocated properly. An inaccessible object is one that has been allocated but has no pointer pointing to it.
Match the following terms with the definitions given belowTerms Gi.pdf
1. Match the following terms with the definitions given below
Terms Given
a. Heap
b. Memory leak
c. Inaccessible object
d. Dangling pointer
e. Destructor
f. Dynamic data
Definitions given
i. The loss of available space that occurs when dynamic data is not deallocation properly.
ii. The area of memory used for allocation and deallocation of dynamic data.
iii. An object that has been allocated but has no pointer pointing to it.
iv. Variables created with the new operation.
v. A pointer that points to a dellocated object.
vi. A member function invoked when an object goes out of scope.
Solution
Heap - The area of memory used for allocation and deallocation of dynamic data.
Memory leak - The loss of available space that occurs when dynamic data is not deallocation
properly.
Inaccessible object - An object that has been allocated but has no pointer pointing to it.
Dangling pointer - A pointer that points to a dellocated object.
Destructor - vi. A member function invoked when an object goes out of scope.
Dynamic data - Variables created with the new operation.