On Fri, Jul 06, 2018 at 05:16:54PM +0000, Ecstatic Coder via Digitalmars-d-announce wrote: > > Are you seriously going to ignore video games that are entirely > > implemented in GC focus language such as C#/java?! The GC is NOT AN > > ISSUE IF YOU KNOW WHAT YOU ARE DOING! > > > > -Alexander > > +1 > > Indeed ABSOLUTELY NO garbage collection will happen during the game > loop is 100% of your GC-language code doesn't make any string > concatenation, object allocation, etc. [...]
import core.memory; GC.disable(); string s; foreach (i; 0 .. 1_000_000) { s ~= "look ma! no GC collection happens!"; } ... GC.collect(); // GC collection happens here ... GC.enable(); // go back to "default" GC behaviour T -- Three out of two people have difficulties with fractions. -- Dirk Eddelbuettel