
- Forum
- Programming Talk
- C and C++
- Want to Know about the Pointer Type
Want to Know about the Pointer Type
This is a discussion on Want to Know about the Pointer Type within the C and C++ forums, part of the Programming Talk category; I have some doubts regarding auto_ptr. What are the main features of auto_ptr and I also want to know whether ...
-
Want to Know about the Pointer Type
I have some doubts regarding auto_ptr. What are the main features of auto_ptr and I also want to know whether auto_ptr is capable of handling automatic exception handling process. Kindly clarify me on this.
-
06-10-2007, 03:16 PM #2
- Join Date
- Apr 2006
- Answers
- 124
auto_ptr is actually a smart pointer. The main usage of the auto_ptr is for deleting the heap pointers automatically. But as you have asked whether auto_ptr is capable of handling automatic exception handling process. The answer for this question is NO. Because auto_ptr is not capable of handling automatic exception handling process.
-
Auto pointer is used for proper memory management such as memory Allocation and de-allocation.
"auto_ptr" is auto pointer class template.
When we allocate memory using "auto_ptr" class then there is no need to de-allocate a memory,
It automatically de-allocates the memory after exiting from the scope of class
-
Sponsored Ads

Reply With Quote





