FlushMem

BlitzMax Forums/BlitzMax Beginners Area/FlushMem

Sanctus(Posted 2006) [#1]
In some examples I saw the flushmem command but it doesn't work anymore(or did it a while back?)
So could somenone tell me it replacement or wanth should i do?


tonyg(Posted 2006) [#2]
It's automated. If you have an example with Flushmem then simply remove it.


Brendane(Posted 2006) [#3]
GCCollect()


Yan(Posted 2006) [#4]
Garbage collection is now automatic, so you can safely delete (or comment out) any FushMem commands.

If you really feel the need to force a collection, you can use GCCollect instead.

[edit]
Cor blimey, guv!..
[/edit]


Gabriel(Posted 2006) [#5]
If you really feel the need to force a collection, you can use GCCollect instead.


In fact, if you're working with external libraries which also maintain some kind of reference count, you may well HAVE to use GCCollect. Either that or miss out on any chance to automatically clean up the external objects.

EDIT: Actually, that's not strictly true. You could wrap the external ref-counting as well, but there's an overhead.


skidracer(Posted 2006) [#6]
What examples are these? I have searched all the examples distributed with the current version of BlitzMax and can not find any remainding FlushMem commands.


Amon(Posted 2006) [#7]
What about the CodeArcs? Maybe there are some in there. Haven't looked though.


H&K(Posted 2006) [#8]
The full NeHe archive still has flushmem doesnt it?


sigi(Posted 2006) [#9]
Yes, it would be cool to have the NeHe TuTs fully working.


Dreamora(Posted 2006) [#10]
The nehe stuff does not work at all without some rewrite.
It was written with BM 1.12 ... the module structure changed since then (will be the first thing you get spotted as the gl module it tries to import does not exist anymore).