SHARE
TWEET

Turning off the D garbage collector

a guest Feb 26th, 2012 192 Never
  1. import core.memory;
  2.  
  3. void main(string[] args) {
  4.     GC.disable;
  5.     // Do stuff.
  6. }
  7.        
  8. import std.gc;
  9.  
  10. void main(char[][] args) {
  11.     std.gc.disable;
  12.     // Do stuff.
  13. }
  14.        
  15. import tango.core.Memory;
  16.  
  17. void main(char[][] args) {
  18.     GC.disable;
  19.     // Do stuff.
  20. }
RAW Paste Data
Top