prevent garbage collection on windows by holding final references to controller and listener