I'm just about done Koenig & Moo's Accelerated C++ and in Chapters 13 & 14 they lay out the idea and implementation of a few Handle classes (simple, shared, reference counted).
The classes encpasulate a raw pointer and abstract the allocation / deallocation of dynamic objects away from the client code to avoid all the dangers of raw pointers as well allowing the user to dereference them to access the pointed to object. Basically a 'safer' way to interface with raw memory resources.
Are the classes presented in these chapters essentially implementations of smart pointers? Smart pointers are still pretty new to me but from what I understand these Handle classes are performing the same function.
Is there a a distinction between the two or is it just another name for the same thing?
Assuming they're equivalent in function, in practice would a class like this ever be written from scratch rather than using an already made smart pointer solution?
EDIT
I should add that the classes they develop in these chapters are template classes so they're not bound to a specific resource, as in they're not designing a specific FileHandle class for example.
I found this article:
http://www.informit.com/articles/article.aspx?p=25264
and the code in the first code snippet there, 7.1, is pretty much what they've got in the chapters I'm referring to.
Thanks SO,