Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

calling finish() from Activity

i want to know that , is finish(); call effect static variables.? does static variables is affected by GC.

static int displayChart = 0;

code of declaration.

like image 677
Youddh Avatar asked Dec 02 '22 21:12

Youddh


1 Answers

static variable belongs to class not the object, and finish() or garbage collector affects object, therefore it got no influence on static variables. Please note that class does not equals object but object is instance of class.

like image 151
Marcin Orlowski Avatar answered Dec 10 '22 13:12

Marcin Orlowski