From 20c7aa703bf0be2744f1578d4e6c2044c15a51c0 Mon Sep 17 00:00:00 2001 From: Benjamin Paassen Date: Wed, 11 Feb 2015 17:25:35 +0100 Subject: Added "unmanage" function which removes managed objects from the Manager in the case their destructor is called (e.g. because an exception is called in the constructor). --- src/core/managed/Manager.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/core/managed/Manager.hpp') diff --git a/src/core/managed/Manager.hpp b/src/core/managed/Manager.hpp index 6275df1..47d1fc7 100644 --- a/src/core/managed/Manager.hpp +++ b/src/core/managed/Manager.hpp @@ -272,6 +272,14 @@ public: */ void manage(Managed *o); + /** + * Removes a previously managed object from the manager -- this function is + * called from the destructor of the Managed class. + * + * @param o is the object that should be unregistered from the manager. + */ + void unmanage(Managed *o); + /** * Stores a reference to the given target object from the given source * object. If the source pointer is set to nullptr, this means that the -- cgit v1.2.3