android - Lifetime of anonymous object run as thread in Java -


within method have following,

runnable r = new runnable() {                     public void run() {                        ...                        ...                      }                                        };                               new thread(r).start(); 

what lifetime of anonymous object , thread ?

what lifetime of anonymous object , thread ?

1) thread keeps running until stop it.

2) object scope(r) in method.


Comments

Popular posts from this blog

javascript - How to name a jQuery function to make a browser's back button work? -

python - Django-easy-pdf: xhtml2pdf reporting reportlab 2.2+ is required, but 3.0 installed -

collision detection - C++ library for mesh to mesh intersection: what is available? -