Newer
Older
zorg / 0_gc.go
Loweel on 17 Aug 308 bytes First commit
package main

import (
	"log"
	"runtime"
	"time"
)

func init() {

	log.Println("Garbage Collector Thread Starting")

	go memoryCleanerThread()

}

func memoryCleanerThread() {

	for {
		time.Sleep(Zint)
		log.Println("Time to clean memory...")
		runtime.GC()
		log.Println("Garbage Collection done.")
	}

}