]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Deprecate SmartPointer::clear().
authorWolfgang Bangerth <bangerth@colostate.edu>
Fri, 26 Jul 2024 00:05:43 +0000 (18:05 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Fri, 26 Jul 2024 00:05:43 +0000 (18:05 -0600)
include/deal.II/base/smartpointer.h

index 947d6badc6a96c7144d1ae7659587a439148250a..7511e386be7fab93e6bc4111aeefd7397e81f731 100644 (file)
@@ -159,8 +159,16 @@ public:
   operator=(const SmartPointer<T, P> &tt);
 
   /**
-   * Delete the object pointed to and set the pointer to zero.
+   * Delete the object pointed to and set the pointer to nullptr. Note
+   * that unlike what the documentation of the class describes, *this
+   * function actually deletes the object pointed to*. That is, this
+   * function assumes a SmartPointer's ownership of the object pointed to.
+   *
+   * @deprecated This function is deprecated. It does not use the
+   * semantics we usually use for this class, and its use is surely
+   * going to be confusing.
    */
+  DEAL_II_DEPRECATED
   void
   clear();
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.