From: Wolfgang Bangerth Date: Fri, 26 Jul 2024 00:05:43 +0000 (-0600) Subject: Deprecate SmartPointer::clear(). X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b60fe3554d2f481e0aa13db91c2fc53414ee735e;p=dealii.git Deprecate SmartPointer::clear(). --- diff --git a/include/deal.II/base/smartpointer.h b/include/deal.II/base/smartpointer.h index 947d6badc6..7511e386be 100644 --- a/include/deal.II/base/smartpointer.h +++ b/include/deal.II/base/smartpointer.h @@ -159,8 +159,16 @@ public: operator=(const SmartPointer &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();