Click here to Skip to main content
12,701,601 members (34,087 online)
Click here to Skip to main content


40 bookmarked

The fastest smart pointer in the west

, 7 Oct 2003
Need a super quick implementation of a reference counting smart pointer? AUTO_REF delivers just that, with a 'thin' source code of just 3,886 bytes (< 4KB)

//PTR_SWITCH values:       40 - A: use AUTO_REF   
//                         50 - B: use C pointers (MY_CLASS *)
//                         60 - C: use RefCountPtr
//                         70 - D: use idllib::SmartPtr
//                         80 - E: use boost::shared_ptr
//                         90 - F: use GE::Safe::PtrStrong

#define PTR_SWITCH 40

//Uncomment the next line to turn verbose mode on
//#define VERBOSE

#ifdef _DEBUG
#  ifndef VERBOSE
#	   define VERBOSE
#  endif

#endif //_SETUPH_LOADED_

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.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Itay Maman
Israel Israel
No Biography provided

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170118.1 | Last Updated 8 Oct 2003
Article Copyright 2001 by Itay Maman
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid