new variable set to global
Buffer in main game implemented and fixed eventual leaks