0

I am getting this error ,

ERROR/WindowManager(451): Activity com.andro.pbk.PhotoGallery has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@4050bbe8 that was originally added here

can any body let me know why it occur and how can avoid this?

CoDe
  • 11,056
  • 14
  • 90
  • 197
  • show your code... Think you are trying to access the ui element where it should not be used... – Dinash Jul 29 '11 at 18:21
  • 2
    this usually happens when there is something attached to an activity. the activity gets finished but that object is still there. an example would be a progress dialog that doesn't have cancel() called before its parent activity is finished or goes on pause. – Kevin Qiu Jul 29 '11 at 21:12
  • @Kevin Qiu : yes same Kevin...i am getting error with progress dialog.but I already close instance of progress dialog b4 finish activity. – CoDe Jul 30 '11 at 08:15
  • do you close it before the next activity is called or on onpause/ondestroy? – Kevin Qiu Jul 31 '11 at 23:40
  • @kevinQui : no..after finishing my progress bar thread ..i finish my activity. – CoDe Aug 01 '11 at 05:59
  • You need to show your logcat to give us more idea. if you already solved please add the answer. – blessanm86 Sep 05 '11 at 06:28
  • any interest in explaining this situation? I noticed similar issue with my code when I press back on one of my activities. Taking look in onDestroy(), I implemented for experimenting, show me there was call for inflating dialog there.. Maybe somebody will find it useful facing similar error. @KevinQiu gave good example – Ewoks Feb 29 '12 at 15:49
  • Possible duplicate of http://stackoverflow.com/questions/2850573/activity-has-leaked-window-that-was-originally-added – SteveCav Mar 11 '12 at 22:50

0 Answers0