0

I know that in java, objects are eligible to be deleted by Garbage Collector if no reference refers to them.

So my question is : how spring can make spring bean available all time?

I think there is some object which refers all beans. But these objects instead?

Maybe they are java Properties.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Luca
  • 33
  • 8

1 Answers1

1

The ApplicationContext's BeanFactory (YMMV) has references to all the (non-prototype and some other scope) beans it creates, as well as all the utility objects it uses to create them.

Sotirios Delimanolis
  • 274,122
  • 60
  • 696
  • 724