Click here to Skip to main content
11,495,534 members (69,105 online)
Click here to Skip to main content
Add your own
alternative version

The fastest smart pointer in the west

, 7 Oct 2003 92.8K 1.4K 40
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

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