From 153832fbba3a2c2f85b31a131caa6f1b50fe3cc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 9 Oct 2019 18:06:30 +0200 Subject: [PATCH] add a function to reset a Handle --- STL_Extension/include/CGAL/Handle.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/STL_Extension/include/CGAL/Handle.h b/STL_Extension/include/CGAL/Handle.h index 14304c4a7b8..d17b52b0e32 100644 --- a/STL_Extension/include/CGAL/Handle.h +++ b/STL_Extension/include/CGAL/Handle.h @@ -75,6 +75,15 @@ class Handle return *this; } + void reset() + { + if (PTR) + { + --PTR->count; + PTR=0; + } + } + int refs() const { return PTR->count; }