aviod android memory leak

by venkat vakiti » Mon, 07 Dec 2009 14:04:10 GMT


Sponsored Links
 can someone tell me avoid android memory leak.how to remove resources
when the screen orientation changes?

--



aviod android memory leak

by Romain Guy » Mon, 07 Dec 2009 14:35:52 GMT


 Unless you are somehow keeping a reference to a Context via a static
field, resources are automatically discarded on orientation change.
You can read the following articles to help you:

 http://www.curious-creature.org/2009/02/07/track-memory-allocations-on-android/ 
 http://www.curious-creature.org/2008/12/18/avoid-memory-leaks-on-android/ 



>


Sponsored Links


Other Threads

1. Can not start the Email?

The test code is below:

    Intent intent = new Intent(Intent.ACTION_VIEW,Uri.parse("mailto:
t...@google.com"));
    startAcitvity(intent);

If I doesn't config the Gmail account in my device, the test code will get
an ActivityNotFoundException; and
If I config an Gmail account in my device, the test code will start the
Email Activity. So why the test code get
an ActivityNotFoundException?

-- 

2. How to arrange the primary key in ascending order

I have a table like this

public void insertToSwitchTable(String switchName,int roomID,String
roomName)
{
sampleDB.execSQL("CREATE TABLE IF NOT EXISTS " +
                    SWITCH_TABLE_NAME +
                    "(SwitchID integer primary key
autoincrement,SwitchName VARCHAR,RoomID integer,RoomName VARCHAR);");


                sampleDB.execSQL("INSERT INTO " +
                                SWITCH_TABLE_NAME +
                                " Values 
(null,'"+switchName+"','"+roomID+"','"+roomName
+"');");
}


Now I want to arrange the records according to ascending order of
RoomID. How to do this?

Thanks.

-- 

3. OOT : Ngobrol santai di Springhill pkl. 19:00 Wib

4. HTC EVO as a Dev Phone in non 4g Country

5. 5,000 5 star ratings for Radar Now!

6. For Google about BaseAdapter class

7. Data Connection Retries