Hi PB Team.
All commands uses FreeXXXXX Commands to free any PB allocated resources. Only ExamineDirectory uses FinishDirectory().
To be common with all other commands it maybe better to rename this to FreeDirectory() too?
Cheers
Mike
Rename FinishDirectory() to FreeDirectory()
Why not use macros until Fred agrees you?
Advantage: No performance-loss, because you use a macro insted of a procedure.
Hast du alles verstanden?
Code: Select all
Macro FreeDirectory(dir)
FinishDirectory(dir)
Macro
Hast du alles verstanden?

PB 4.30
Code: Select all
onErrorGoto(?Fred)
No, only directory!Trond wrote:All Examine*() functions are closed with Finish*()
CloseDirectory or FreeDirectory is more logical in my head

PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

You are right, it sounds more logicaly.ts-soft wrote:No, only directory!Trond wrote:All Examine*() functions are closed with Finish*()
CloseDirectory or FreeDirectory is more logical in my head
This was the first time I used the FileSystem Lib of PB. And while coding I wanted to release the #PB_Any allocated Ressources and wondered that FreeDirectory() does not exist.
But anyway, I can also live with FinishDirectory().

Tranquil
I noticed your message, sorry for not replaying to it.AND51 wrote:You sound, as if you didn't pay attention to my post...
The reason of my posting was only something logical I encountered while coding. Your Macro is surely a workarround for me, but its not really neccessary.
Anyway, thanks for your idea.
Und klaro hab ich Dich verstanden.

Tranquil
lol, dann ist ja alles im Lot.
All in all, I also agree to Tranquils idea renaming FinishDirectory() to FreeDirectory().

All in all, I also agree to Tranquils idea renaming FinishDirectory() to FreeDirectory().
PB 4.30
Code: Select all
onErrorGoto(?Fred)