On 2/18/2013 5:35 AM, Benjamin Thaut wrote:
I wen't down this path already and I ended up not using the GC at all:

http://3d.benjamin-thaut.de/?p=20

I very much enjoyed this article. Hopefully your changes can be applied upstream.

A couple of my own ideas, in hopes that those with more knowledge can comment:

1. A @nogc attribute. This would work similarly to pure/safe/nothrow and would check at compile time that annotated functions or any they call allocate any memory enforced by the GC. Then phobos would no longer be a "landmine" for those with realtime requirements.

2. GC.collect(timeout). This would run a collection only until timeout is reached. It could be called with timeout=remaining frame time, and would allow expensive collections to span multiple frames.


Reply via email to