SpeedEX505
SpeedEX505

Reputation: 2076

Store objcets in singleton class

Is it good idea store my data objects in static variables of singleton class? I have class AppEngine where are some data static e.g. boolean int and instances of my classes (Configuration etc.)

When these objects are destroyed?

If I want to use them I call it something like this: MyEngine.getMyEngine().getConfiguration().method(arg);

Upvotes: 0

Views: 87

Answers (1)

Bhanu Sharma
Bhanu Sharma

Reputation: 5145

no no no dude just put null in that object like this

singltonclassobject = null;

it will destroy. :)

Upvotes: 1

Related Questions