travis workaround
fix memory leak by using a weakref