From b60fe3554d2f481e0aa13db91c2fc53414ee735e Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 25 Jul 2024 18:05:43 -0600 Subject: [PATCH] Deprecate SmartPointer::clear(). --- include/deal.II/base/smartpointer.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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(); -- 2.39.5