Top "Lazy-initialization" questions

Lazy initialization is the tactic of delaying the creation of an object, the calculation of a value, or some other expensive process until the first time it is needed.

Threading : Lazy Initialization vs Static Lazy Initialization

I am going through Java Memory Model video presentation and author is saying it is better to use Static Lazy …

java multithreading static lazy-initialization
Lazy loading Angular views and controllers on page scroll

I have a microsite that is utilizing Laravel and Angular. It's a one page microsite that is responsive and is …

javascript angularjs lazy-initialization
Does .net core dependency injection support Lazy<T>

I am trying to use the generic Lazy class to instantiate a costly class with .net core dependency injection extension. …

c# dependency-injection asp.net-core .net-core lazy-initialization
Difference when serializing a lazy val with or without @transient

Working on spark, sometimes I need to send a non-serializable object in each task. A common pattern is @transient lazy …

scala serialization apache-spark lazy-initialization transient
Kotlin lazy properties and values reset: a resettable lazy delegate

So I use kotlin for android, and when inflating views, I tend to do the following: private val recyclerView by …

android properties kotlin lazy-initialization
Declaring a field as lazy

In TypeScript, is there a syntax for declaring a field as lazily-initialized? Like there is in Scala, for example: lazy …

typescript lazy-initialization
How to use System.Lazy with Setter to Lazy Initialization of List in POCO Entities?

I want to use System.Lazy to Lazy Initialization of my List in my Entites: public class Questionary { private Lazy&…

c# .net entity-framework c#-4.0 lazy-initialization
Overriding property getters with lazy loading in Objective-C

I usually lazy instantiate my @property objects in their getter methods like this: @interface MyGenericClass : UIViewController @property(nonatomic, readonly) UIImageView *…

objective-c properties overriding lazy-loading lazy-initialization
Lazy dictionary properties in C#

I have a class with a property that's a Dictionary: public class Entity { public Dictionary<string, string> Name { …

c# properties lazy-initialization
Methods for Lazy Initialization with properties

I'm currently altering a widely used class to move as much of the expensive initialization from the class constructor into …

c# c#-3.0 recommendation-engine lazy-initialization