I need to fetch data from the Server.
So I chosen Asysntask class to send my HTTP request .
Below is the template of my Code:
clss A{
new B().getDataFromServer(); //This method will be called several times.
}
class B{
public String getDataFromServer(){
Task task = new Task();
task.execute();
}
class Task extends AysncTask{
//async task stuff here
}
}
Now my question is, I am craeting Task task = new Task() object many times. The above step will cause perfomance issue.?? Please let me know if ther's any other simple or less memory consumption way to do this.