You canāt disable GC. You can only try to avoid creating too much garbage.
So whatās garbage? - you may ask. Itās the stuff you donāt need anymore.
In C/C++ and a lot of other languages you have to allocate and deallocate memory for yourself. Sounds like fun - but itās a lot of work and usually it produces a lot of errors and so called āmemory leaksā (if you forgot to delete/deallocate memory itās marked as āin useā and canāt be used till the next reboot).
In Jave deallocation is done automatically by the GC. Unfortunately the whole world is stopped as long as the GC has something to do.
The only thing wich helps a bit is avoiding garbage where itās possible. You can create a āpoolā of objects wich you reuse till the end of the program (Yes. Recycling avoids garbage ;)).
The GC kicks in every here and thenā¦ if there is a lot to do it will take awhile and if thereās nothing to do you wonāt even notice it.
Well the loosing of events sounds quite seriouslyā¦ that shouldnāt happen ever :-/