Set delegate to nil when deallocating.
Set delegate to nil when deallocating.

Otherwise the code crashes when the KKGridView instance gets
deallocated. It appears that [UIScrollView dealloc] releases the
delegate (which gets deallocated) and then there’s a call to [KKGridView
setDelegate:] with a nil argument. The call goes through the setter,
which references the already freed _delegate and EXC_BAD_ACCESS ensues.

kolinkrewinkel/KKGridView,kolinkrewinkel/KKGridView,kundanjadhav/KKGridView