Capture self weakly in PostponingBlock.
This commit is contained in:
parent
a91fd53100
commit
d9f2607922
@ -32,9 +32,9 @@ import os
|
|||||||
|
|
||||||
invalidateTimer()
|
invalidateTimer()
|
||||||
|
|
||||||
timer = Timer.scheduledTimer(withTimeInterval: delayInterval, repeats: false) { timer in
|
timer = Timer.scheduledTimer(withTimeInterval: delayInterval, repeats: false) { [weak self] timer in
|
||||||
MainActor.assumeIsolated {
|
MainActor.assumeIsolated {
|
||||||
self.block()
|
self?.block()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user