Document possible problem with unbinding functors.

Unbind() may currently disconnect the wrong functor as it compares them by
address.

See http://thread.gmane.org/gmane.comp.lib.wxwidgets.general/81445

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76033 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-02-28 22:35:07 +00:00
parent 316fdcbd6d
commit 18cd6f624f

View File

@@ -995,6 +995,12 @@ public:
been added using the Bind<>() method. There is no way to unbind been added using the Bind<>() method. There is no way to unbind
functions bound using the (static) event tables. functions bound using the (static) event tables.
@note Currently functors are compared by their address which,
unfortunately, doesn't work correctly if the same address is reused for
two different functor objects. Because of this, using Unbind() is not
recommended if there are multiple functors using the same @a eventType
and @a id and @a lastId as a wrong one could be unbound.
@param eventType @param eventType
The event type associated with this event handler. The event type associated with this event handler.
@param functor @param functor