Fixed garbage collection of created delegates