Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

C++11 Smart Pointers

, 26 Sep 2013
Various Smart Pointers in C++11
SharedPtr.zip
SharedPtr
SharedPtr
SharedPtr.opensdf
SharedPtr.vcxproj.filters
UniquePtr.zip
UniquePtr
UniquePtr
UniquePtr.vcxproj.filters
WeakPtr.zip
WeakPtr
WeakPtr
WeakPtr.vcxproj.filters
#include <memory>
using namespace std;

class B;
class A
{
public:
	A( ) {};
			~A()
			{
				int j = 0;
			}
			//shared_ptr<B> m_spToB;
			B* m_spToB;
};

class B
{
public:
	B( ) {};
			~B()
			{
				int k = 0;
			}
			//shared_ptr<A> m_spToA;
			A* m_spToA;
};

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Babu_Abdulsalam
Software Developer
India India
I'm working as Senior software Engineer since 7 years and interested in MFC and COM programming.

| Advertise | Privacy | Mobile
Web04 | 2.8.140827.1 | Last Updated 26 Sep 2013
Article Copyright 2013 by Babu_Abdulsalam
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid