• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Lifecycle of Objects Before Spring Boot DI

 
Greenhorn
Posts: 20
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am a beginner to Spring Boot so have started with Dependency Injection concept. One thing I see about DI in almost all the sites is that 'Lifecycle of the objects are maintained by Spring'. Even before Spring in core Java, I couldn't see it is maintained by us with the ClassLoaders and GC involved.

Could someone explain me how objects are maintained in java before Spring Boot DI came into play?
 
Rancher
Posts: 1064
27
Netbeans IDE Oracle MySQL Database Tomcat Server C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
life in java is pretty simple: have a reference to the object and the object says live, lose the reference, the object becomes orphaned, then the object is marked for garbage collection. the object will still hang around until the garbage collector disposes of it, but will not be addressable because it has been orphaned.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic