On Aug 4, 11:09 pm, "Dmitry.Skiba" <dmitry.sk...@gmail.com> wrote: > I've found a way to get rid of garbage collection! > The receipt is simple (and ironic): do not use allocateDirect(), use > allocate(). And use only ByteBuffer, not FloatBuffer, IntBuffer, etc. > - using asFloatBuffer() on non-direct ByteBuffer will result in crash > in libhgl. (I'm too lazy to create an issue for that.)
I'm pretty sure this will break in the next release. My (very limited) understanding is that direct buffers are supposed to be required, but Android wasn't enforcing their use. This situation has been corrected. The allocations reduced by 8767 (earlier in the thread) were Harmony PlatformAddress objects, which are only associated with direct buffers. So it makes sense that your change would cut the allocations; just be aware that it may stop working. (I'll ask one of the GL folks to check me on this.) --~--~---------~--~----~------------~-------~--~----~ 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-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---