Posts: 357
Threads: 118
Joined: Oct 2004
Does FB automatically free memory when something goes out of scope?
SUB foo
dim a as intger, b as integer
'code
END SUB
Will it automatically free up the 64 bits on END SUB? I've noticed some memory leaking and I can't figure out if its FB or something else that I am running.
f you play a Microsoft CD backwards you can hear demonic voices. The scary part is that if you play it forwards it installs Windows.
Posts: 3,522
Threads: 189
Joined: Dec 2003
It should clean it up, afaik
If you want to mess with allocate, reallocate and deallocate, take a look at memProcs
Available at plantasy (link in my sig)
It adds some nice functions for memory handling in FB.
Are you using FRE to check the memory?
Windows doesent free all mem immediately it seems, but keeps it, just in case the prog needs some mem again..
If you close the program and then start it, you should have the mem back..
Atleast thats how it seems to be for me.
Posts: 525
Threads: 23
Joined: Oct 2004
Neither does VB or any other....Not sure if it keeps it in case it needs or maybe even until the OS commits the disk cache to the hard drive.
Posts: 658
Threads: 71
Joined: Sep 2003
FreeBasic always clears up DIM'ed memory upon exiting subs/functions. Static defines however are freed only apon exit. This is what I know...
However it does not control allocate / callocate 'd memory. This you have to free on your own.
url]http://fbide.sourceforge.net/[/url]
Posts: 357
Threads: 118
Joined: Oct 2004
could it be FBIde? My memory keeps dropping and triggering my System Mechanic 5 to do a RAM defragmentation and recovery
f you play a Microsoft CD backwards you can hear demonic voices. The scary part is that if you play it forwards it installs Windows.
Posts: 3,522
Threads: 189
Joined: Dec 2003
It's probably Windows, mine does the same..
After a while running my computer i have 0mb free, yet I can allocate 100mb without problem
Windows buffering/caching wonders..