diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-05 00:15:24 +0100 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-05 00:15:24 +0100 |
commit | 9b1db73f776309668b1f5fa20dece1849c8d035b (patch) | |
tree | 81f411906de269f22fa38a144eb65bcc8143df7c /src/core/managed/Manager.hpp | |
parent | 0abccb029e55326f9de99563e38ed4c9a87eb4d1 (diff) |
Using weak references for storing the owner in events.
Diffstat (limited to 'src/core/managed/Manager.hpp')
-rw-r--r-- | src/core/managed/Manager.hpp | 13 |
1 files changed, 5 insertions, 8 deletions
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. |