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...

What modifier should you use on a class so that a class in the same package can access it but a class (including a subclass) in a different package cannot access it?

a. public b. private c. protected d. Use the default modifier.

Computer Science & Information Technology

An external style sheet file extension is ____.

A. .exe B. .css C. .php D. .jpg

Computer Science & Information Technology

Which service provided by a PKI ensures that a party in a communication can't dispute the validity of the transaction?

A. Authentication B. Nonrepudiation C. Confidentiality D. Integrity

Computer Science & Information Technology

What RADIUS alternative is commonly used for Cisco network gear and supports twofactor authentication?

A. RADIUS+ B. TACACS+ C. XTACACS D. Kerberos

Computer Science & Information Technology