ios - Is it necessary to use [unowned self] in closures of UIView.animateWithDuration(...)? -


    uiview.animatewithduration(1,         animations: { [unowned self] in             self.box.center = self.boxtoprightposition         },         completion: { [unowned self] completed in             self.box.hidden = true     }) 

is necessary avoid memory leak?

no, not needed in case. animations , completion not retained self there no risk of strong retain cycle.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -