Good news so far... :)
ANOQ of the Sun
Fri, 05 Nov 1999 16:23:21 +0100
"Stephen Weeks" wrote:
> Code containing _prim should only be compiled using MLton, not SML/NJ.
> What I do for program development is use stubs so that I can typecheck
> using SML/NJ. Once the program typechecks, I then compile using
> MLton. So, I have a file that defines a bogus MLton structure which I
> reference in my sources.cm that looks like the following:
Actually I use MLKit now for typechecking :) Then the game really
works correctly with SDL et al (only I can't play it for a long
time because of the memory leaks...).
The problem with _prim was when running cmcat. I just need to
concatenate one extra sml file with the _prims (which is the
MLTon version of the SDL bindings).
Right now I paste this file by hand, which is actually not that
bad. Your makefile might come in handy though... Thanks!
> This already exists in MLton -- MLton.GC.collect.
> MLton.GC.collect does a full GC, which takes time proportional to the
> amount of live data, so if you call it whenever there isn't much live
> data, then it might be enough. But I doubt this is good enough for
> your situation.
Cool! I think I will call this at the start of every "level"
in the game... just to be sure, but it really runs great as it is :)