Added bind for weak_ptr sample