GCSuspend()

BlitzMax Forums/BlitzMax Programming/GCSuspend()

You're right.

However, today I spent a large amount of time tracking down a bug that finally led back to a large number of GCSuspend() and GCResume() calls. I could not produce the error on my single-core machine, but one user's quad core did produce an error. I finally resolved this by eliminating all those GCSuspend/Resume calls. It is a little worrying to me that only his quad core was able to produce an error, and my single core ran fine.

I wasn't attempting any multithreading stuff.


Strict
Graphics 800,600

Type TFoo
Field data:Int[1000]
EndType

Local foo:TFoo

GCSuspend()

While Not KeyDown(key_escape)
foo=New TFoo
Cls
DrawText GCMemAlloced(),10,10
Flip
If KeyHit(key_space)
GCResume()
EndIf
Wend
End