1

Is it still the case that Android never unloads classes?

view story
linux-howto

http://stackoverflow.com – We have a large app that's always running into the dread method count limit. I've been asked to come up with a way to let it do much more, including supporting plugins. Looking for ways to unload code, I ran across JNI Tips which says Classes are only unloaded if all classes associated with a ClassLoader can be garbage collected, which is rare but will not be impossible in Android. This did seem to imply that a plugin can be unloaded if you, say, use a new DexClassLoader for each .jar file, only ever refer to the plugin through an interface reference, and null-out any copies of t (HowTos)