Re: the garbage collector in bgt

I would also like to put forth the suggestion that you force the garbage collector to run a cycle as little as you can. Don't deliberately call garbage_collect() every 5 seconds or whenever a function ends, in a classes destructor, etc. In fact, I'd recommend you only call it if you know for a fact that the GC fails to clean up after and you know that that's the only way to erase your app's memory usage. The garbage collector is designed to be intelligent enough to scan for when objects are no longer referenced and when it's time to destroy them; let it handle that for you and don't try to handle it yourself. The only time you should have need to call the garbage_collect() function is if you know that your app uses a lot of memory at a certain point. Just beware that by the time that the game gets to calling the function the GC might've already ran a cycle for you.

_______________________________________________
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : 2maidi via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : ironcross32 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : 2maidi via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : kianoosh via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : kianoosh via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : 2maidi via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : 2maidi via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector

Reply via email to