Jacek Laskowski 57 Posted December 4, 2018 I register classes and factories in Spring: container.RegisterType<TMyClass>; container.RegisterFactory<TMyClassFactory>; Then in the code I use: fClassFactory: TMyClassFactory; [...] begin lMyClass: = fClassFactory(); [some code] lMyClass.Free; <- who is responsible? end; Who is responsible for the release of the object? Spring or me? Share this post Link to post
Stefan Glienke 2002 Posted December 4, 2018 You, the container only is responsible for singleton lifetime Share this post Link to post