localpointer.h File Reference
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
These classes are inspired by
- boost::scoped_ptr & boost::scoped_array
- Taligent Safe Pointers (TOnlyPointerTo)
but none of those provide for all of the goals for ICU smart pointers:
- Smart pointer owns the object and releases it when it goes out of scope.
- No transfer of ownership via copy/assignment to reduce misuse. Simpler & more robust.
- ICU-compatible: No exceptions.
- Need to be able to orphan/release the pointer and its ownership.
- Need variants for normal C++ object pointers, C++ arrays, and ICU C service objects.
For details see http://site.icu-project.org/design/cpp/scoped_ptr
Definition in file localpointer.h.
Go to the source code of this file.