Useages - ScSofts/AutoGC GitHub Wiki

The AutoGC namespace consists:

  1. GC_Init(); and GC_Shut();. This two functions must be called in the main function
  2. class Object,and all objects in the heaps MUST be based on it
  3. class Hanged<class MemType>,this class cannot be used by yourself. You can just call return heap.Escape(Obj); to avoid MemType & Obj being collected. Attention: a function return Hanged Object must call .unReceive(); to delete it or .receive(heap); to move it to a new heap!
  4. class Int and class Long and etc. just warpped the int and long and etc. You can "New" them in the heap.