It is currently Wed Jul 17, 2019 5:45 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: [Done] 5.70 memory leak with http headers
PostPosted: Fri Apr 12, 2019 8:13 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Jan 12, 2011 3:48 pm
Posts: 184
Location: Serbia
Compile as a console program, it will leak half a megabyte every second.

Code:
InitNetwork()

Repeat
  NewMap headers.s()
  For i = 1 To 100
    headers("Header-" + Str(i)) = "something"
  Next
  FinishHTTP(HTTPRequest(#PB_HTTP_Get,"http://localhost","",0,headers())) ; url doesn't matter
  FreeMap(headers())
ForEver

_________________
PB examples collection
pb-osx-globalhotkeys
pb-osx-notifications


Top
 Profile  
Reply with quote  
 Post subject: Re: 5.70 memory leak with http headers
PostPosted: Mon Apr 15, 2019 12:59 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 13595
Location: France
It's fixed for next version.


Top
 Profile  
Reply with quote  
 Post subject: Re: [Done] 5.70 memory leak with http headers
PostPosted: Tue Apr 16, 2019 12:02 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Jan 12, 2011 3:48 pm
Posts: 184
Location: Serbia
Unfortunately it's not fixed completely in 5.71 beta 1.

This still leaks, just much much slower, probably something else is not being freed correctly.

Code:
InitNetwork()

Repeat
  NewMap headers.s()
  string.s = ""
  For i = 1 To 1000
    headers("Header-" + Str(i)) = "something"
    string + "String" + Str(i)
  Next
  FinishHTTP(HTTPRequest(#PB_HTTP_Get,"http://localhost",string,#PB_HTTP_NoSSLCheck,headers())) ; url doesn't matter
  FreeMap(headers())
ForEver

_________________
PB examples collection
pb-osx-globalhotkeys
pb-osx-notifications


Top
 Profile  
Reply with quote  
 Post subject: Re: 5.70 memory leak with http headers
PostPosted: Tue Apr 16, 2019 2:01 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 13595
Location: France
Will look again


Top
 Profile  
Reply with quote  
 Post subject: Re: 5.70 memory leak with http headers
PostPosted: Fri Apr 26, 2019 10:18 am 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 13595
Location: France
Fixed.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye