I have heard that static variable will make the program consume very much memory. It is because garbage collector (GC) will not work on static variable. Is that correct?
I am also wondering when does the memory space of a static variable is allocated, during compile or during runtime?
thanks in advance,