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. MPEG4 playback issue?

We have a clent that has videos online that stream... we are taking
the same videos an converting them to MPEG4 for mobile playback....
thhey work for fine for most of the phones that we tested except the
Andiod Phone?

Does anyone have any solutions... the test allowed audio playback but
the video was black?

Greg
Developer
--~--~---------~--~----~------------~-------~--~----~

2. Using Picasa Web Albums Data API in Android

Try this snippet.
If its wat u need go ahead..
otherwise post back with wat u require apart from this.
Intent temp = new Intent(Intent.ACTION_SEND);
  temp.setType("image/jpeg");
  temp.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
  temp.putExtra(Intent.EXTRA_STREAM, imageURI);
  temp.setComponent(new ComponentName(
  "com.google.android.apps.uploader",
  "com.google.android.apps.uploader.picasa.PicasaUploadActivity"));
  startActivityForResult(temp, 0);
since i did this long time ago, i sont remember the exact permissions
required...
<uses-permission android:name="android.permission.GET_ACCOUNTS"></
uses-permission>
<uses-permission
android:name="com.google.android.googleapps.permission.GOOGLE_AUTH"></uses-permission>
but its either both or one of the above...









-- 
Regards,
Sujay
Samuel Goldwyn<http://www.brainyquote.com/quotes/authors/s/samuel_goldwyn.html>
- "I'm willing to admit that I may not always be right, but I am never
wrong."

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

3. Lifecycle control of a surfaceviews surface

4. android SDK 1.5 where do i find the sqlite db file in my system

5. How can the permission exception happens?

6. Application spontaneous resets G1

7. Android emulator can't get correct resulotion when viewed http://picasaweb.google.com/m/viewer?source=androidclient