[Gambas-user] HTTPClient freeze after 40 mins with Gambas 3.18.4

Benoît Minisini benoit.minisini at gambas-basic.org
Fri Sep 29 15:06:14 CEST 2023


Le 29/09/2023 à 08:01, Christof Thalhofer a écrit :
> Am 28.09.23 um 23:17 schrieb Benoît Minisini:
> 
>> Do you run the event loop between two calls to Get()?
> 
> It's a timer in the main form of the application called 'TimerLeds'. 
> Every time it triggers, it runs a Sub 'RetrieveFlags()' in the form's 
> class that creates a new object of the class 'DegApp' (which contains 
> the Get() function).
> 
> Code shortened:
> 
>> Public Sub TimerLeds_Timer()
>>     RetrieveFlags()
>> End
>>
>> Sub RetrieveFlags()
>>     Dim App As New DegApp
>>     jsonliste = App.Get()
>>     ' then do some stuff with jsonliste
>> End
> 
> 'RetrieveFlags()' does some stuff with 'jsonliste' but even when I 
> switch that code off it eats memory and crashes the application after a 
> while.
> 
> I also tried also to insert 'App = Null' at the end of RetrieveFlags() 
> but still it eats memory.
> 
> Alles Gute
> 
> Christof Thalhofer
> 

I asked because I tried a simple loop that does an HttpClient.Get() 8192 
times. It eats a bit of memory if I don't call the event loop, because 
some stuff is freed only during it. But if I call 'Wait' after each 
request, I have no memory leak.

So it may be something related to the URL requested... I tried with 
"localhost".

Regards,

-- 
Benoît Minisini.



More information about the User mailing list