KAZE memory management a bit more efficient