[libsigcplusplus] docs: slots: auto: Mention why it is bad.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsigcplusplus] docs: slots: auto: Mention why it is bad.
- Date: Fri, 1 Apr 2016 10:06:32 +0000 (UTC)
commit a51e91edd07d36642273635a6448ef5ec410f765
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Apr 1 11:47:03 2016 +0200
docs: slots: auto: Mention why it is bad.
sigc++/functors/slot_base.h | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/sigc++/functors/slot_base.h b/sigc++/functors/slot_base.h
index affbc9d..24787e2 100644
--- a/sigc++/functors/slot_base.h
+++ b/sigc++/functors/slot_base.h
@@ -230,6 +230,10 @@ struct SIGC_API slot_do_unbind
* auto sl = sigc::mem_fun(someobj, &SomeClass::somemethod); // Not a slot!
* @endcode
*
+ * If you don't explicitly use a sigc::slot then the slot could call a method
+ * on an instance after it has been destroyed even if the method is in a class
+ * that derives from sigc::trackable.
+ *
* @section slots-with-lambdas C++ Lambdas
*
* A C++11 lambda expression is a functor (function object). It is automatically
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]