Skip to content

Commit

Permalink
Nil out closure on CADisplayLink after completion
Browse files Browse the repository at this point in the history
  • Loading branch information
Reflejo committed Oct 24, 2017
1 parent c83170a commit c7fba9a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion 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'
Expand Down
1 change: 1 addition & 0 deletions Sources/LambdaKit/CADisplayLink+LambdaKit.swift
Expand Up @@ -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()
}

Expand Down

0 comments on commit c7fba9a

Please sign in to comment.