Page 6 of 6

Re: PureBasic 5.71 LTS is out !

Posted: Sat Aug 17, 2019 9:46 am
by Josh
skywalk wrote:I never use #Null$. What is the downside if I continue to let PB manage its internal string buffers? Is there a memory leak or just excess memory use?
#Null$ is needed for some APIs

Re: PureBasic 5.71 LTS is out !

Posted: Sat Aug 17, 2019 10:57 am
by mk-soft
If you work a lot with Pointers and AllocateMemory it can lead to memory leaks.

With global variables it is not so critical yet, because they are overwritten again and again. But you have to be careful with memory.

With ClearStructure you can completely clean up the memory. But if you want to release only one string in the structure of the memory completely, you can use the following trick.

With the version before PB v5.70 it was enough to assign #Null$ from releasing the resource.

Code: Select all

Macro FreeStructureString(_struct_, _offset_)
  ClearStructure(_struct_ + _offset_, string)
EndMacro

Structure udtFoo
  iVal.i
  sVal.s
EndStructure

*mem.udtFoo = AllocateMemory(SizeOf(udtFoo))
*mem\iVal = 100 
*mem\sVal = Space(1000000)
Debug PeekI(*mem + OffsetOf(udtFoo\sVal))
FreeStructureString(*mem, OffsetOf(udtFoo\sVal))
Debug PeekI(*mem + OffsetOf(udtFoo\sVal))

Re: PureBasic 5.71 LTS is out !

Posted: Sat Aug 17, 2019 2:37 pm
by skywalk
I will discuss further in your new thread...

Re: PureBasic 5.71 LTS is out !

Posted: Sat Aug 17, 2019 4:33 pm
by chi
Thank you Fred and Team!

Re: PureBasic 5.71 LTS is out !

Posted: Tue Aug 20, 2019 6:14 pm
by Psychophanta
Congratulations and many thanks! :!:

Re: PureBasic 5.71 LTS is out !

Posted: Tue Aug 27, 2019 1:49 pm
by Blue
Thank you, Fred and other PB tinkerers.

@Fred : it appears you forgot to include the promised constant to indicate whether the DPi option is checked in the Windows version. (see here)

Re: PureBasic 5.71 LTS is out !

Posted: Thu Aug 29, 2019 12:29 am
by USCode
Fred wrote:Final version is out, thank you a lot for testing !
Does the News page need to be updated with this version? https://www.purebasic.com/news.php
:)

Re: PureBasic 5.71 LTS is out !

Posted: Wed Jan 29, 2020 11:26 am
by FlatEarth
No more updates?

Re: PureBasic 5.71 LTS is out !

Posted: Wed Jan 29, 2020 11:32 am
by Fred
In progress.

Re: PureBasic 5.71 LTS is out !

Posted: Wed Jan 29, 2020 12:52 pm
by Kwai chang caine
Fred wrote:In progress.
Image

Re: PureBasic 5.71 LTS is out !

Posted: Thu Jan 30, 2020 2:41 pm
by Kurzer
Haha, dogs are so loyal friends.

Sent via mobile phone

Re: PureBasic 5.71 LTS is out !

Posted: Fri Jan 31, 2020 12:55 pm
by Kwai chang caine
Kurzer wrote:Haha, dogs are so loyal friends.
Yes.....always loyal to my CREATOR MASTER FRED that i love, and for the life 8)
But when even, anxious to never see coming a new dog bowl, of the more and more great part of my life each day :| (With new bones interesting for me :wink: )

I know my MASTER do the maximum, it's why i wait, i wait, each day with a little hope....
But since the birth of a certain spider, sometime i have the feeling to live in the movie "Groundhog Day" :cry:

Image

Time seems a hundred times longer for those who wait, than those who are expected.
And a thousand times more, when he receives no news. :|
As the extraordinary Albert :shock: 8) could have said:

Image

"Here !!!!! is a factual demonstration ....
of the relativity of time" :mrgreen: