Shared Pointers

Feb 19, 2014 at 10:52am
Hi All,
I tried to searh online regarding shared pointers and I read a lot that they avoid memory leak.

When smart pointers can make sure that they can avoid memory leak...why do we need these shared pointers?

Are both smart pointers and shared pointers same?

I have implemented smart pointers and no idea about shared pointers.

Please share one small program that emphasize the use of shared pointers.

Thanks a lot in advance
Feb 19, 2014 at 11:07am
Shared pointers are a type of smart pointer - probably the most commonly-used type.

There are other types of smart pointer, too, that enforce different ownership paradigms.
Feb 19, 2014 at 11:18am
Feb 19, 2014 at 7:19pm
Can you please share an example program using a shared pointer?


Thanks in advance
Prasad
Feb 19, 2014 at 7:55pm
Topic archived. No new replies allowed.