Closures are self-contained blocks of functionality that can be passed around and used in your code. They are similar to blocks in C and Objective-C and lambda functions in other programming languages. Closures can capture and store references to any constants and variables from the context in which they are defined. This is known as closing over those constants and variables.
Closures is a powerful feature in Swift, but it does demand caution in some cases.
Classes and Closures are both reference types. Because a closure can capture values from its surrounding scope, a closure can create a reference cycle.