How about use Gc as a big memory pool?

Dsby via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Apr 7 20:27:04 PDT 2016


when the soft start, call GC.disable().
use "new " create a class , struct or a array. and use 
destory(T/void *) to call the ~this(), then GC.free to free the 
memory, and use RAII in class or Struct.
And user the Timer, or in some where to call : GC.enable(), 
GC.collect(), GC.disable();

In this way , i can know and control when is GC runing.

Is This way   feasible? will It  have a problem?


More information about the Digitalmars-d-learn mailing list