break reference loop using weakref to prevent memory-leaking