Android Question When to use response.release?

wimpie3

Well-Known Member
Licensed User
I currently have this in my code:

B4X:
Sub hc_ResponseSuccess (Response As HttpResponse, TaskId As Int)
    Log("http response returned")
    Response.Release
End Sub
However, I get a crash on Response.Release (android.os.NetworkOnMainThreadException).

Is the .release needed, why and in what circumstances?
 
Top