PureBasic 5.71 LTS is out !

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
Josh
Addict
Addict
Posts: 1183
Joined: Sat Feb 13, 2010 3:45 pm

Re: PureBasic 5.71 LTS is out !

Post 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
sorry for my bad english
User avatar
mk-soft
Always Here
Always Here
Posts: 5335
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: PureBasic 5.71 LTS is out !

Post 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))
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
skywalk
Addict
Addict
Posts: 3972
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: PureBasic 5.71 LTS is out !

Post by skywalk »

I will discuss further in your new thread...
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
chi
Addict
Addict
Posts: 1028
Joined: Sat May 05, 2007 5:31 pm
Location: Linz, Austria

Re: PureBasic 5.71 LTS is out !

Post by chi »

Thank you Fred and Team!
Et cetera is my worst enemy
User avatar
Psychophanta
Addict
Addict
Posts: 4969
Joined: Wed Jun 11, 2003 9:33 pm
Location: Lípetsk, Russian Federation
Contact:

Re: PureBasic 5.71 LTS is out !

Post by Psychophanta »

Congratulations and many thanks! :!:
http://www.zeitgeistmovie.com

While world=business:world+mafia:Wend
Will never leave this forum until the absolute bugfree PB :mrgreen:
User avatar
Blue
Addict
Addict
Posts: 864
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

Re: PureBasic 5.71 LTS is out !

Post 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)
Last edited by Blue on Thu Aug 29, 2019 3:31 am, edited 1 time in total.
"That's not a bug..." said the programmer. "it's a feature! "
"Oh! I see..." replied the blind man.
User avatar
USCode
Addict
Addict
Posts: 912
Joined: Wed Mar 24, 2004 11:04 pm
Location: Seattle, USA

Re: PureBasic 5.71 LTS is out !

Post 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
:)
FlatEarth

Re: PureBasic 5.71 LTS is out !

Post by FlatEarth »

No more updates?
Fred
Administrator
Administrator
Posts: 16619
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PureBasic 5.71 LTS is out !

Post by Fred »

In progress.
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5342
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: PureBasic 5.71 LTS is out !

Post by Kwai chang caine »

Fred wrote:In progress.
Image
ImageThe happiness is a road...
Not a destination
User avatar
Kurzer
Enthusiast
Enthusiast
Posts: 664
Joined: Sun Jun 11, 2006 12:07 am
Location: Near Hamburg

Re: PureBasic 5.71 LTS is out !

Post by Kurzer »

Haha, dogs are so loyal friends.

Sent via mobile phone
PB 6.02 x64, OS: Win 7 Pro x64 & Win 11 x64, Desktopscaling: 125%, CPU: I7 6500, RAM: 16 GB, GPU: Intel Graphics HD 520, User age in 2023: 56y
"Happiness is a pet." | "Never run a changing system!"
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5342
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: PureBasic 5.71 LTS is out !

Post 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:
ImageThe happiness is a road...
Not a destination
Post Reply