kunalkumar somani wrote:Dear it takes same storage even i would say less storage but do you really think we need to store in application context? no and never please try to understand application object is available in the whole application, even if you dont required object you are storing in application context and tht way you are increasing the size of application context object and it is very costly.
And singleton is not a bad idea. if you want to become a good programer and improve your application performance, you should use maximum java design pattern.
Singleton is one of the java design pattern.
kunalkumar somani wrote:I'm not telling you that "storing the data in a singleton reference will take less memory than storing it elsewhere". I mean to say first you are creating one object it takes memory than the same object you are storing in another object tht increase the size of that object as well.
And please don't tell singleton is one of the most abused of the patterns.