// Playground - noun: a place where people can play

import UIKit

var str = "Hello, playground"


class TestClass {
    typealias nameClosure = (() -> String)
    
    var name = "Jon"
    
    lazy var myClosure: nameClosure =  {
        return self.name
    }
    
    deinit {
        print("Usunięto egzemplarz TestClass")
    }
}




var testClass: TestClass? = TestClass()
//println(testClass!.myClosure())
testClass = nil

print("Egzemplarz testClass został usunięty")



