Dvm do not occupy data memory for un used class. What about program memory ? On Sep 15, 2011 1:50 PM, "Daniel Drozdzewski" <[email protected]> wrote: > On 15 September 2011 02:59, Pratik Prajapati <[email protected]> wrote: >> Dear All, >> >> There are a lot of classes in my (big) APK which are used no where(some test >> code is part of the APK with the actual service). Will dalvik VM keep these >> classes in memory at runtime? ( many classes are not used to create any >> object out of them). >> >> As per my understanding, dalvik creates a single .dex file by combining all >> the .class in the apk. Does dalvik breaks this .dex file while running its >> bytecode and use the minimum code in memory? > > > Correct. Class that is not referenced anywhere in your code will never > come into attention of any class loader, hence will never occupy the > memory. > > Please mind that big APK might cause your users pain. It is good > practice to strip debug and test code from the public release. > > Using ProGuard would shave unused classes off. > > -- > Daniel Drozdzewski > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

