Note that NoPtr provides strict ownership, which is very different from shared ownership. Strict ownership uses less resources, makes it easier to follow when a resource gets released back to the system, and makes it explicit what part of your code is responsible for the lifetime of a resource. For shared ownership, your best bet is the boost library's shared_ptr. However, if you are thinking that you need shared ownership rather than strict ownership just so you can use STL containers of smart pointers, think again: NoPtr's strict ownership semantics works in STL containers too.
NoPtr should help you eliminate, at virtually no run-time cost in a release build (see performance link above):
Most of you will want to take a look at the How to use the NoPtr library page. This will give you a feel for what is and isn't possible with this library, what classes/methods support various tasks and in certain cases why things were done a certain way.
The current version is beta: the unit tests are good, but can't cover all the myriad cases that users other than the creator will cover. Also, several concepts are still experimental and need "trial by fire" to see if they really work as intended. So please let me know of any problems you have (don't forget to give compiler version and file release version). I welcome any feedback you may have: capabilities to add, suggested changes to interface, mistakes I have made (e.g. docs), etc.
Add back_inserter to convert list of DynObj's to list of RRef's
Provide thread-safety?
Compare object file size for DynObj/RRef vs raw pointers
Add make target to create release
This project's CVS repository, located on SourceForge, can be checked out online, or through anonymous (pserver) CVS with the following CVS commands (replace cvshost with cvs.noptrlib.sourceforge.net, and when prompted for a password for anonymous, simply press the Enter key):
cvs -d:pserver:anonymous@cvshost:/cvsroot/noptrlib login
cvs -z3 -d:pserver:anonymous@cvshost:/cvsroot/noptrlib co NoPtr
Updates from within the module's directory do not need the -d parameter.
Copyright:
Copyright (C) 2003 Oliver Schoenborn
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
You can redistribute it and/or modify it under the terms found in the LICENSE file that is included in the library distribution.