Reputation: 2076
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
Reputation: 5145
no no no dude just put null in that object like this
singltonclassobject = null;
it will destroy. :)
Upvotes: 1