From 9b1db73f776309668b1f5fa20dece1849c8d035b Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Mon, 5 Jan 2015 00:15:24 +0100 Subject: Using weak references for storing the owner in events. --- src/core/managed/Manager.hpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/core/managed/Manager.hpp') diff --git a/src/core/managed/Manager.hpp b/src/core/managed/Manager.hpp index eb4594a..761603b 100644 --- a/src/core/managed/Manager.hpp +++ b/src/core/managed/Manager.hpp @@ -375,10 +375,9 @@ public: * registered. * @param type is the event type that should be registered. * @param handler is the callback function. - * @param owner is a managed object that owns the event handler. A reference - * from the the reference object to the owner is added. The argument may be - * nullptr in which case no reference is added. The owner is passed to the - * event handler as second parameter. + * @param owner is a managed object that owns the event handler. May be + * nullptr. The owner is only referenced via a weak reference. If the owner + * is freed, the event handler will no longer be called. * @param data is some user defined data. * @return a numeric event id, which is unique for the given reference * object. The event id must be used when unregistering event handlers. @@ -405,10 +404,8 @@ public: * registered. * @param type is the event type that should be registered. * @param handler is the callback function. - * @param owner is a managed object that owns the event handler. A reference - * from the the reference object to the owner is added. The argument may be - * nullptr in which case no reference is added. The owner is passed to the - * event handler as second parameter. + * @param owner is a managed object that owns the event handler. May be + * nullptr. * @param data is some user defined data. * @return true if the operation was successful, false if either the * reference object or and event with the given signature do not exist. -- cgit v1.2.3