weakref testing to see if it solves memory leaks