20.1k views
1 vote
To help prevent memory leaks from occurring in C++ 11, a ________ automatically deletes a chunk of dynamically allocated memory when the memory is no longer being used. -dereferenced pointer -smart pointer -null pointer -None of these

User RRStoyanov
by
5.2k points

1 Answer

5 votes

Answer: Smart pointer

Explanation: Smart pointers are the components that store the dynamic data . It is the pointer that shows the extra or additional features such as automatic bound checking and eliminating the memory that is not being used any further. .It helps to decrease the bugs and improve it's efficiency.

Other options are incorrect because dereferenced pointer is used for the changing the position of value stored in certain memory location to the pointed location and null pointer does not point toward any value.Thus, the correct option is smart pointer.

User Shunan
by
5.5k points