java - Garbage Collection and Callbacks -


if have object a, calls dao object b perform database update - once b's function completes calls call function in a (a.finishprocess()) create memory issues? mean b remain in memory until a completes? or b still removed gc?

i ask i'm considering using call backs instead of returning "result" object or code b.

in short, better design (and memory usage) wise "return" object of results rather using callback calling object?

ps: please ignore specific's ie, doesn't mention asycntask, contrived situation question across :)

cheers help

it references. long don't store/keep (strong) references around (i.e. proper deregistration, clearing references once object no longer in use, etc), don't have worry object handled gc.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -