Question on memory management in android

by Anton S. » Wed, 05 Jan 2011 03:01:52 GMT


Sponsored Links
 Hi,
I have a single image that is slightly larger than the android screen
which I load into a ScrollView.

My question is the following:

Does android load the entire image into memory even though parts of it
are invisible(need to be scrolled to),
or does it use some kind of external/internal cache to store parts of
the image that are not
currently visible? If not, do you think it would be possible to
implement something like this.

Thanks!!

-- 



Re: Question on memory management in android

by Doug » Thu, 06 Jan 2011 08:51:12 GMT


 Bitmaps are going to take as much memory as they need for the grid of
pixels they represent.  If you want to store a giant image into a
giant bitmap (or even if you just want to create a giant empty bitmap)
you will consume that memory.

Android doesn't do so well with giant bitmaps that come and go because
they don't get garbage collected in the way you'd expect, and you'll
often run into memory problems if you attempt this.  It's a really
hairy topic with a lot of prior conversation around it that you can
easily search and find.

Doug




-- 


Sponsored Links


Re: Re: Question on memory management in android

by Anton S » Fri, 07 Jan 2011 02:32:30 GMT


 Alright, so that means it does load the entire image into memory.

I guess I'll try to break up my image and only load parts of it as they are
needed.


Thanks for you input Doug!






-- 



Other Threads

1. Info-Based: Indian Rupee finally gets its symbol

*Indian Rupee finally gets its symbol*

NDTV Correspondent, 15 July, 2010
[image: Original]

Finally, the Rupee will have a symbol like the Dollar ($) or the Euro ( or
the Pound (). The Cabinet today finalised the design for the Rupee.

IIT post-graduate Uday kumar's entry has been selected out of five
shortlisted designs as the new symbol for the Indian Rupee.

The government had organised a symbol design competition with a prize money
of Rs 2.5 lakh. Five designs were shortlisted from a competition and all new
notes will bear the design finally approved.

The growing influence of the Indian economy in the global space is said to
have prompted this move that will result in the Indian rupee joining the
select club of global currencies like the US dollar, the British Pound,
European Euro and Japanese Yen that have unique symbols.

The abbreviation for the Indian Rupee, 'Re' or 'Rs' is used by India's
neighbours Pakistan, Nepal and Sri Lanka.

-- 

2. Eclipse crashing with android SDK

It's  very hard to read with all the wrapping, but I found


java.lang.NullPointerException
       at
org.eclipse.wst.xml.core.internal.document.ElementImpl.getDefaultValue(ElementImpl.java:
259)
       at
org.eclipse.wst.xml.core.internal.document.ElementImpl.getAttributeNS(ElementImpl.java:
329)

which is a known issue with 3.6. We recommend to stay with 3.5 at the moment.

-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.

Please do not send me questions directly. Thanks!

-- 

3. simplecursoradapter

4. ERROR:- no such table: TABLE: , while compiling: SELECT _id, network, url FROM TABLE

5. You should use query bindings with "?" in SQLite

6. Galaxy S Video Out on Action.

7. Market question about copy protection