My application creates a ZoomButtonsController during
Activity.onCreate(). To make the controls visible, I call
ZoomButtonsController.setVisible(true) in Activity.onTouch(). However
when I exit my application, I get an exception (see below) indicating
a "leaked IntentReceiver", and suggests that I must call
unregisterReceiver(). Why is this? How is a ZoomButtonsController
related to an IntentReceiver? How do I unregister it?  The javadoc for
ZoomButtonsController does not mention this. Can someone please refer
me to an example showing how to create and destroy a
ZoomButtonsController?

Thanks,
Tom

E/ActivityThread( 7613): Activity com.tomoreilly.astronomy.FreeSolaris
has leaked IntentReceiver android.widget.ZoomButtonsController
$...@4602e948 that was originally registered here. Are you missing a
call to unregisterReceiver()?
E/ActivityThread( 7613): android.app.IntentReceiverLeaked: Activity
com.tomoreilly.astronomy.FreeSolaris has leaked IntentReceiver
android.widget.zoombuttonscontrolle...@4602e948 that was originally
registered here. Are you missing a call to unregisterReceiver()?
E/ActivityThread( 7613):        at android.app.ActivityThread$PackageInfo
$ReceiverDispatcher.<init>(ActivityThread.java:803)
E/ActivityThread( 7613):        at android.app.ActivityThread
$PackageInfo.getReceiverDispatcher(ActivityThread.java:614)
E/ActivityThread( 7613):        at
android.app.ApplicationContext.registerReceiverInternal(ApplicationContext.java:
734)
E/ActivityThread( 7613):        at
android.app.ApplicationContext.registerReceiver(ApplicationContext.java:
721)
E/ActivityThread( 7613):        at
android.app.ApplicationContext.registerReceiver(ApplicationContext.java:
715)
E/ActivityThread( 7613):        at
android.content.ContextWrapper.registerReceiver(ContextWrapper.java:
308)
E/ActivityThread( 7613):        at
android.widget.ZoomButtonsController.setVisible(ZoomButtonsController.java:
387)
E/ActivityThread( 7613):        at
com.tomoreilly.astronomy.Solaris.onTouchEvent(Solaris.java:434)
E/ActivityThread( 7613):        at
android.app.Activity.dispatchTouchEvent(Activity.java:2071)
E/ActivityThread( 7613):        at
com.android.internal.policy.impl.PhoneWindow
$DecorView.dispatchTouchEvent(PhoneWindow.java:1679)
E/ActivityThread( 7613):        at
android.view.ViewRoot.handleMessage(ViewRoot.java:1708)
E/ActivityThread( 7613):        at
android.os.Handler.dispatchMessage(Handler.java:99)
E/ActivityThread( 7613):        at android.os.Looper.loop(Looper.java:123)
E/ActivityThread( 7613):        at
android.app.ActivityThread.main(ActivityThread.java:4595)
E/ActivityThread( 7613):        at
java.lang.reflect.Method.invokeNative(Native Method)
E/ActivityThread( 7613):        at
java.lang.reflect.Method.invoke(Method.java:521)
E/ActivityThread( 7613):        at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:860)
E/ActivityThread( 7613):        at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
E/ActivityThread( 7613):        at dalvik.system.NativeStart.main(Native
Method)

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to