multithreading - Garbage collection in Invoked Methods Java -


my question consists of 2 parts. first question has when using java method class invoke method loaded class. "invoked" method run in separate thread? if so, can access it?

second, consider case call method loaded class using invoke. assume method calls system.exit(). if use security manager stop system.exit() call happening, , parent program catches security manager exception, child thread garbage collected?

does "invoked" method run in separate thread?

no, java reflection in general has nothing multithreading.

will child thread garbage collected?

since there no multithreading involved, believe second question rendered moot. more generally, though, there no propagation of exceptions between threads, if child thread ends due unhandled exception, parent thread won't able magically "catch" it. think logically: parent thread @ point off unrelated piece of code , there no sense in interrupting stacktrace has nothing executing.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -