Weak Method

The WeakMethod is used by the Clock class to allow references to a bound method that permits the associated object to be garbage collected. Please refer to examples/core/ for more information. This WeakMethod class is taken from the recipe, based on the nicodemus version. Many thanks nicodemus!

class mpf.core.weakmethod.WeakMethod(method)

Implementation of a weakref for functions and bound methods.


Returns True if the referenced callable was a bound method and the instance no longer exists. Otherwise, return False.