View hierarchy is as follows TabActivity -> ActivityGroups -> Activities.
Using MAT I found that TabWidget is referenced by TabHost which is referenced by InputMethodManager, hence TabWidget is leaked. On Subsequent launch of application OutOfMemory Error is thrown.
Similarly all my activities are also referenced by InputMethodManager.
(After closing the application all my activitygroups, activities, tabactivity, tabhost and tabwidget are leaked!!)
On Properly finishing the application (hitting back key), following is shown in logcat
WARN/InputManagerService(99): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@44a87748 (uid=10052 pid=1463)
How to remove the reference from InputMethodManager...?
Thing I tried:
A. Called this method onDestroy of my TabActivity
1. myTabWidget.removeAllViews()
2. myTabWidger.invalidate()
No Luck!