Skip to content

Commit 49a05a0

Browse files
committed
docs: slots: auto: Mention why it is bad.
1 parent de51a87 commit 49a05a0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sigc++/functors/slot_base.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,10 @@ struct SIGC_API slot_do_unbind
213213
* auto sl = sigc::mem_fun(someobj, &SomeClass::somemethod); // Not a slot!
214214
* @endcode
215215
*
216+
* If you don't explicitly use a sigc::slot then the slot could call a method
217+
* on an instance after it has been destroyed even if the method is in a class
218+
* that derives from sigc::trackable.
219+
*
216220
* @section slots-with-lambdas C++ Lambdas
217221
*
218222
* A C++11 lambda expression is a functor (function object). It is automatically

0 commit comments

Comments
 (0)