What are smart pointers?

Answer Posted / nashiinformaticssolutions

• Smart pointers like std::unique_ptr, std::shared_ptr, and std::weak_ptr manage dynamic memory automatically, preventing memory leaks.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the size of integer variable?

812


Differentiate between an external iterator and an internal iterator? What is the advantage of an external iterator.

808


Who created c++?

798


Why is null pointer used?

899


If dog is a friend of boy, is boy a friend of dog?

780


Why ctype h is used in c++?

721


Explain operator overloading.

819


What you know about structures in C++?

823


What is double in c++?

827


What are c++ templates used for?

879


What is abstraction c++?

790


What is the difference between a "copy constructor" and an "assignment operator" in C++?

849


What is flush programming?

781


What does ctime() do?

809


Can member data be public?

784