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.

Spring Data Mongo MongoDB DBRef lazy initialization

I'm using Spring + Spring Data MongoDB. My model is like this: @Document(collection = "actors") public class Actor extends DomainEntity { private …

spring spring-data spring-data-mongodb lazy-initialization dbref
Are lazy vars in Swift computed more than once?

Are lazy vars in Swift computed more than once? I was under the impression that they replaced the: if (instanceVariable) { …

swift lazy-initialization computed-properties
How to initialize a property in iOS UITableViewController

I am working on a UITableViewController @interface GinkgoDeliveryOrdersTableViewController : UITableViewController @property PFQuery * query; @property NSArray * products; @end How shall I initialize …

ios objective-c initialization lazy-initialization
Getting "org.hibernate.LazyInitializationException" exceptions after retrieving items from my second-level ehcache

I'm using Hibernate 5.1.0.Final with ehcache and Spring 3.2.11.RELEASE. I have the following @Cacheable annotation set up in one of …

java spring hibernate ehcache lazy-initialization
Spring @Async generates LazyInitializationExceptions

The Spring MVC application needs to execute an intensive computation job which takes several minutes. The client wants to run …

spring asynchronous lazy-initialization
Grails and Hibernate's Lazy Initialization Exception

Where are the most common places where you've gotten an org.hibernate.LazyInitializationException in Grails, what was the cause and …

hibernate grails gorm lazy-initialization
Is there a way to late-initialize a member variable (a class) in C++?

I am coming from the Java background. I have the following program. #include <string> #include <iostream> …

c++ class constructor initialization lazy-initialization
Lazy initialisation and retain cycle

While using lazy initialisers, is there a chance of having retain cycles? In a blog post and many other places […

swift memory-management memory-leaks automatic-ref-counting lazy-initialization