Re: [android-developers] help on dalvik VM.
On 15 September 2011 02:59, Pratik Prajapati <pratik.prajapati@gmail.com> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home