use weakref to prevent leak

I noticed that formotion was leaking for me (2.17) and I traced it down to this
Merge pull request #179 from iwarshak/patch-1

use weakref to prevent leak