Revision: 8723 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8723&view=rev Author: efiring Date: 2010年10月03日 20:45:38 +0000 (2010年10月03日) Log Message: ----------- docs: in event_handling, note that weak references to callbacks are used. Modified Paths: -------------- branches/v1_0_maint/doc/users/event_handling.rst Modified: branches/v1_0_maint/doc/users/event_handling.rst =================================================================== --- branches/v1_0_maint/doc/users/event_handling.rst 2010年09月27日 18:51:05 UTC (rev 8722) +++ branches/v1_0_maint/doc/users/event_handling.rst 2010年10月03日 20:45:38 UTC (rev 8723) @@ -46,6 +46,13 @@ fig.canvas.mpl_disconnect(cid) +.. note:: + The canvas retains only weak references to the callbacks. Therefore + if a callback is a method of a class instance, you need to retain + a reference to that instance. Otherwise the instance will be + garbage-collected and the callback will vanish. + + Here are the events that you can connect to, the class instances that are sent back to you when the event occurs, and the event descriptions This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.