Swift - Lazy loading a property that can be made nil later
问题 I am looking for a way to lazy load my variable, but I want to be able to make it nil later and then recreate it on the get. For example in the instance that there is a memory warning i want to clear anything that isn't used and then recreate it when needed again later. Here is how I would do it in Objective-C and my current interpretation in swift. I am not sure that it preserves the variable for keeping current navigation. Obj-C Implementation @property (strong, nonatomic, readwrite)