From c7fba9aa2f022fc52d5e7da59f87d74da16c3807 Mon Sep 17 00:00:00 2001 From: Martin Conte Mac Donell Date: Tue, 24 Oct 2017 12:40:31 -0700 Subject: [PATCH] Nil out closure on CADisplayLink after completion --- LambdaKit.podspec | 2 +- Sources/LambdaKit/CADisplayLink+LambdaKit.swift | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/LambdaKit.podspec b/LambdaKit.podspec index 21ed0ff..0570292 100644 --- a/LambdaKit.podspec +++ b/LambdaKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'LambdaKit' - s.version = '0.2.3' + s.version = '0.2.4' s.license = 'MIT' s.summary = 'Closures on most used UIKit methods' s.homepage = 'https://github.com/Reflejo/LambdaKit' diff --git a/Sources/LambdaKit/CADisplayLink+LambdaKit.swift b/Sources/LambdaKit/CADisplayLink+LambdaKit.swift index 1951548..55cbc60 100644 --- a/Sources/LambdaKit/CADisplayLink+LambdaKit.swift +++ b/Sources/LambdaKit/CADisplayLink+LambdaKit.swift @@ -54,6 +54,7 @@ extension CADisplayLink { /// Invalidates the current CADisplayLink but calling the handler one more time with progress = 1.0. public func completeAndInvalidate() { self.closureWrapper?.handler(1.0) + self.closureWrapper = nil self.invalidate() }