I would like to remove the GC dependence on my own class objects I am designing and at some point remove the GC completely if possible(assuming at some point D itself will be GC agnostic).

1. Is there a way to determine what the GC is doing? I would like to know just how much my projects are GC depending(both for D internals and my code).

2. Have all classes implement an (almost final) interface to allow for custom allocation schemes. I suppose I can modify the sources, but is there an easier way? I don't want to have to implement the interface for every class I create nor explicitly specify the inheritance.

The interface here basically has a final New method and a virtual ClassSize method which gets the size of the class. (which I think is required over sizeof, classInstanceSize, etc... to prevent slicing). The ClassSize, while being virtual, is basically the same for every class(in fact it just returns a constant which is determined at compile time... I don't want the user to have to write the code for the class).




Reply via email to