Which of the following statements about a unique_ptr object is true?

a. A unique_ptr is a “smart pointer” for managing dynamically allocated memory.
b. When a unique_ptr goes out of scope, its destructor automatically returns the managed memory to the free store.
c. You must explicitly delete the memory that’s managed by a unique_ptr before the object goes out of scope.
d. All of the above.

c. You must explicitly delete the memory that’s managed by a unique_ptr before the object goes out of scope.

Computer Science & Information Technology

You might also like to view...

Which of the following statements are true?

a. A Node can be placed in a Pane. b. A Node can be placed in a Scene. c. A Pane can be placed in a Control. d. A Shape can be placed in a Control.

Computer Science & Information Technology

Define the terms arguments and parameters. How are they different?

What will be an ideal response?

Computer Science & Information Technology