Fix memory leak.

Ticket 845082.

Also, https://github.com/kendo-labs/angular-kendo/issues/237