use Method::WeakCallback to generate leak-free callbacks