MEMORY leak

zdenkot

Member
Licensed User
Longtime User
Hi Erel
On my desktop I have to run web requests continuously. I found memory leak of about 16 kb per request. Please see attached example (HTTP SOAP example with timer).

:sign0085:
 

zdenkot

Member
Licensed User
Longtime User
HTTP library - MEMORY leak

Hi Erel,

Memory leak is not fixed in version 6.8 !?

:sign0013:
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Identifying memory leaks can be pretty tricky in the .Net Framework.
Memory is only released from time to time by the garbage collector.
Previously because of a bug, disposed objects were not really disposed because of an internal reference. This bug was fixed.
I ran your program for several minutes and the memory stopped increasing after a while (the program continued to run properly).
I added the following lines to be sure that the request and response objects are disposed: (line 79)
B4X:
    Response.Close
    Request.Dispose
    AddObject("Request", "WebRequest")
    Response.Dispose
    AddObject("Response", "WebResponse")
 
Top