diff --git a/doc/sgpem2dman.texi b/doc/sgpem2dman.texi index d05507c..95257ee 100644 --- a/doc/sgpem2dman.texi +++ b/doc/sgpem2dman.texi @@ -581,6 +581,24 @@ examples of these operators are: the casting operator, @code{operator delete}, @code{operator new}, @code{operator ^}. +@item +The C++ standard library is your best friend. For example, +if you need to allocate some temporary variable on the heap, +use an @code{auto_ptr<>} that does the right thing even when +an exception is raised, and that respects +@acronym{RAII,Resource Acquisition Is Initialization}. + +Also using extensively algorithms like @code{for_each} and +@code{copy} greatly helps. + +@item +Use @code{glib::ustring} in place of @code{std::string} as +often as possible, to ensure Unicode support. + +@item +If you need a smart pointer, be sure to check out +@code{glib::RefPtr<>}. + @end enumerate