Store references to callback objects to prevent garbage collection.
Merge pull request #1 from brendandahl/store-refs

Store references to callback objects to prevent garbage collection.