Any way to avoid garbage collection on these lines? Bitmap.createBitmap / new Canvas(bitmap)

by Mark Murphy » Tue, 14 Apr 2009 22:12:18 GMT


Sponsored Links
 > I'm happy to keep a static or member reference to the Bitmap object




To me, the key word there is "many".

If really do mean "many", then cache the Bitmap (or perhaps the Canvas) in
a data member or local variable or something until you are outside your
loop and no longer need it. If at that point you are not expecting to
re-enter that loop for some time, null out the data member and let garbage
collection reclaim the space. If you are likely to re-enter the loop soon
and will need the exact same Bitmap again, you may as well hold onto it.

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com 
_The Busy Coder's Guide to Android Development_ Version 2.0 Available!



--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Fwd: [Mobile-App-Developers] Google Mobile Blog

---------- Forwarded message ----------
From: Google Mobile Blog <ogogs...@gmail.com>
Date: Thu, Nov 26, 2009 at 8:39 PM
Subject: [Mobile-App-Developers] Google Mobile Blog
To: mobile-application-develop...@googlegroups.com


   Google Mobile Blog < http://www.***.com/ ;
 
< http://www.***.com/ ;feedurl= http://www.***.com/ ;
------------------------------

Google Search by voice: Now in Times
Square!< http://www.***.com/ %7Er/OfficialGoogleMobileBlog/%7E3/HdzBP3LmD8I/google-search-by-voice-now-in-times.html?utm_source=feedburner&utm_medium=email>

Posted: 25 Nov 2009 03:15 PM PST
< http://www.***.com/ ;If
you've been to Times Square in New York City over the past couple weeks, on
any day from 12:30-2:00pm or 6:30-8:00pm, you may have noticed that Google
Search by voice is powering Times Square's largest combined displays -- the
Reuters Sign and the NASDAQ sign. Anyone can call 888-376-4336 and say the
name of a business or a location that they want to search for, like "museum
of modern art" or "pizza". Then, the query and local search results from
Google will appear on one of the two electronic billboards. This is all part
of Verizon's "Droid Does" campaign < http://www.***.com/ ; and has been
developed in partnership with Reuters < http://www.***.com/ ; and
R/GA< http://www.***.com/ ;,
a digital advertising agency.

On Black Friday, Times Square's gigantic interactive search-by-voice demo
will be running for 20 hours straight. So if you're in the area and have a
chance to take a break from your shopping, or if you want to see your next
shopping destination displayed on a Google map on the huge signs, give the
demo a try and let us know what you think. And for those of you that aren't
in Manhattan on that day, you can still watch the action via
{*filter*}< http://www.***.com/ ;
.

< http://www.***.com/ ;I
flew out to New York last week to try it myself. R/GA gave me a
behind-the-scenes tour of the setup, and I was impressed by how they pulled
this off. A caller's voice is sent through the phone system, directly into a
small farm of real Droids running voice search that are connected to the big
outdoor electronic displays! R/GA developers made use of the Android voice
recognition 
API< http://www.***.com/ ;just
like any Android developer can.

It's been quite a ride for the search by voice team -- from launching on the
iPhone< http://www.***.com/ ;about
a year ago, to our launches on
BlackBerry< http://www.***.com/ ;and
Android< http://www.***.com/ ;,
and on S60 in Mandarin
Chinese< http://www.***.com/ ;,
to powering billboards in Times Square. We're thankful for the chance to
work on technology that e{*filter*}s us and that can help more of you search
faster and more easily on your phone. And we hope you've been noticing the
ongoing improvements in the accuracy of our voice recognition. We can't wait
to show you what we have in store for next year.

Happy Thanksgiving to all!

Posted by Mike LeBeau, Senior Software Engineer
< http://www.***.com/ %7Eff/OfficialGoogleMobileBlog?a=HdzBP3LmD8I:rhioQIRh2JM:yIl2AUoC8zA>
< http://www.***.com/ %7Eff/OfficialGoogleMobileBlog?a=HdzBP3LmD8I:rhioQIRh2JM:V_sGLiPBpWU>
   You are subscribed to email updates from Google Mobile
Blog< http://www.***.com/ ;
To stop receiving these emails, you may unsubscribe
now< http://www.***.com/ ;
. Email delivery powered by Google  Google Inc., 20 West Kinzie, Chicago IL
USA 60610

-- 
Thanks & Regards
<Mobile Application Developers> Group
 http://www.***.com/ 



-- 
Thanks & Regards
Sasikumar.S

-- 

2. how to get domain name

hi all,

I use webview to address the url link,
but I want to know how to get the url's domain name?
such as when I link to http://www.yahoo.com,
then I can get the "yahoo" domain name,

so how to do that?

thanks

-- 

3. DROID so buggy (OpenGL) -- and work around

4. how can I target api 1.6, but use packages from 2.0 (and safely)

5. Connect internet ke PC

6. Andry WTA: GPS Navigation apps

7. Screen is dark momentarily when launching OpenGL view (GLSurfaceView)