Is it safe to create many list? Will garbage collector collect them instantly?

Viewed 32

I'm working on a PC Game emulator written in java. There is around 2.500.000 lines of code and lately i contribute my own code. Sometimes i'm forced to write code that it generate list on every character hit. Imagine 1.500 players hit at the same and do 10 hit per second. This mean 15.000 list generated every minute.

Is this safe? Will garbage collector collect those after code read data of them?

0 Answers
Related