Using a send buffer of 8 or 16 kilobytes gives pretty good performance, and
avoids problems with garbage collection.

--
Kostya Vasilyev -- http://kmansoft.wordpress.com

02.10.2010 0:09 пользователь "DanH" <[email protected]> написал:

I'd suggest that you not create the byte array in <clinit> like that
but rather make it an instance variable.  The way you're doing it that
large array is getting allocated as soon as myclass is loaded, (which
may be well before you first create an instance of the class) and
isn't freed until myclass is unloaded (a lifetime which may be much,
much more than the time you're actually doing a transfer).  Plus if
you ever used your function in multiple threads the threads would
"share" that one array -- with disastrous results.


On Oct 1, 2:39 pm, TheSeeker <[email protected]> wrote:
> i found the solution but i don't h...

-- 
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

Reply via email to