Mango-ptr is a small C++ template library that provides classes to help you use pointers: automating the lifetime of objects allocated from dynamic memory, and enable you to verify that what is being pointed to still exists or has been destroyed.
Therefore, Mango-ptr makes the use of pointers easier and less error-prone: it will help you avoid memory leaks, dangling pointers, unintended shallow copies, implicit and hidden ownership transfer, and having to define destructors and copy constructors just because you are using pointers as data members. Other benefits are that you gain control over when a shared resource is deleted, and you get all the advantages of std::auto_ptr without any of its disadvantages.
Note that I welcome any feedback you may have: capabilities to add, suggested changes to interface, mistakes I have made in the text or documentation, etc.
Usage:
Add tests specifically targetted at UsageSharing and ObjSharing, for more robust regression testing
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.mango-ptr.sourceforge.net, and when prompted for a password for anonymous, simply press the Enter key):
cvs -d:pserver:anonymous@cvshost:/cvsroot/mango-ptr login
cvs -z3 -d:pserver:anonymous@cvshost:/cvsroot/mango-ptr co Mango
Updates from within the module's directory do not need the -d parameter.
Copyright:
Copyright (C) 2002 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.