lof / freememory

Just starting out? Need help? Post your questions and find answers here.
Fable Fox
User
User
Posts: 29
Joined: Fri Dec 12, 2003 4:52 am

lof / freememory

Post by Fable Fox »

I'm a newbie in PB, but after looking at 'lof / length of file' example, I suggest FreeMemory(*MemoriID) is called after CloseFile(0), or does PB have automatic garbage collection that help the user?

Thanks.
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

The memory is freed the program ends. Or you can free it manually like you suggested.
eriansa
Enthusiast
Enthusiast
Posts: 277
Joined: Wed Mar 17, 2004 12:31 am
Contact:

Post by eriansa »

Can somebody explain exactly when the garbage collector will start.
I thought that garbage collection was done in runtime, or does PB's garbage collector run only on exit?
What about a lot of runtime strings used in an app?
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

eriansa wrote:Can somebody explain exactly when the garbage collector will start.
I thought that garbage collection was done in runtime, or does PB's garbage collector run only on exit?
What about a lot of runtime strings used in an app?
PB doesn't have ordinary garbage collection. But when the program ends, all allocated memory is freed.
Strings are freed exactly at the moment they are not longer used.
Post Reply