Android - Removing Jsonobject
I have been searching Google and implementing different methods to try and get this to work, but I can't seem to get a key -> value to remove from the memory. What I am trying t
Solution 1:
Well, in case anyone else runs into this same problem, changing to following
staticInputStreamis=null;
staticJSONObjectjObj=null;
staticStringjson="";
to
InputStreamis=null;
JSONObjectjObj=null;
Stringjson="";
Will solve the problem to where the information isn't saved into the memory.
Solution 2:
static member variable are 1 per Class, and is shared by all the objects of the class.Even though its object is gone, this data is saved in static member, and will be same for the newly created object of the class.
eg:
InputStreamis=null;
JSONObjectjObj=null;
Stringjson=null;
Post a Comment for "Android - Removing Jsonobject"