adspace


What is a lazy var in swift?

Answer Posted / Dayaram Pal

A lazy variable (lazy property) in Swift is a property whose initial value is not computed until the first time it is accessed. This can be useful for reducing the overhead of initializing an object that might not be used, especially when dealing with expensive or time-consuming initialization.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the common execution states for a swift ios app (ios application lifecycle).

900


Explain some biggest changes in usernotifications.

925


How can you define a base class in swift?

931