What about gc.disable() and gc.enable() ? If I'm sure that I won't
allocate anything within a section of code and I have to guarantee
realtime performance, then I could disable the gc temporarily.
Although this is not exactly what it states in the section on memory
management:

"Call std.gc.disable() before the smooth code is run, and
std.gc.enable() afterwards. This will cause the GC to favor allocating
more memory instead of running a collection pass."

Is the gc disabled after the call to gc.disable(), or just relaxed? If
it's not disabled, then I'm not sure why it's named like that.

On Sat, Sep 11, 2010 at 4:28 AM, Jonathan M Davis <[email protected]> wrote:
> snip

Reply via email to