10:07:51 08-16. 410: ERROR/WindowManager (4236): Activity cn. bookall. android. zbook. reader. docReader has leaked window android. widget. textView @ 485348b0 that was originally added here
10:07:51 08-16. 410: ERROR/WindowManager (4236): android. view. windowLeaked: Activity cn. bookall. android. zbook. reader. docReader has leaked window android. widget. textView @ 485348b0 that was originally added here
08-16 10:07:51. 410: ERROR/WindowManager (4236): at android. view. ViewRoot. <init> (ViewRoot. java: 247)
...
08-16 10:07:51. 410: ERROR/WindowManager (4236): at cn. bookall. android. zbook. reader. DocView. ShowPopWindowCenter (DocView. java: 506)
...
08-16 10:07:51. 600: ERROR/AndroidRuntime (4236): java. lang. IllegalArgumentException: View not attached to window manager
Literally, the Window Leaked is probably a form leak, that is, the memory leak we often call. Why is the form Leaked?
Cause:
We know that every Activity in Android has a WindowManager form manager. Similarly, the dialog box and PopupWindow built on an Activity also have the corresponding WindowManager form manager. Because the Dialog box and popupdomainwn cannot be independent from the Activity, when a Dialog or PopupWindow is being displayed, we finish () the Activity that carries the Dialog (or PopupWindow, the Window
Leaked is abnormal because no one in the WindowManager of this Dialog (or PopupWindow) can attach it, so its form manager has been Leaked.
Solution:
Before closing an Activity, make sure that the attached Dialog or PopupWindow has been closed (dismiss.
@ Override
Public void onPause (){
Super. onPause ();
If (pw! = Null ){
Pw. dismiss ();
}
}
Http://blog.csdn.net/u_xtian/article/details/6123945
Http://www.eoeandroid.com/thread-30137-1-1.html