Want more features on Pastebin? Sign Up, it's FREE!
Guest

Turning off the D garbage collector

By: a guest on Feb 26th, 2012  |  syntax: None  |  size: 0.26 KB  |  views: 22  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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. }
clone this paste RAW Paste Data