Thursday, July 9, 2009

What is smart pointer in c language?

Smart pointers are objects that look and feel like pointers, but are smarter. What does this mean?....





http://ootips.org/yonat/4dev/smart-point...

What is smart pointer in c language?
One that deallocates to prevent dangling...
Reply:i think people are giving explanation abt *this pointer.........n thats in c++ nt c where objects r created
Reply:A smart pointer keeps a refrence to an object that has been dynamically allocated and lets you make copies of the smart pointer in different parts of a program and automatically deallocate the object when the last reference to it disappears, preventing memory leaks without requiring you to keep track of memory manually.
Reply:A smart pointer keeps a refrence to an object that has been dynamically allocated and lets you make copies of the smart pointer in different parts of a program and automatically deallocate the object when the last reference to it disappears, preventing memory leaks without requiring you to keep track of memory manually.


No comments:

Post a Comment