summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/foundation/ALooper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'media/libstagefright/foundation/ALooper.cpp')
-rw-r--r--media/libstagefright/foundation/ALooper.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/media/libstagefright/foundation/ALooper.cpp b/media/libstagefright/foundation/ALooper.cpp
index 22777a2..ebf9d8d 100644
--- a/media/libstagefright/foundation/ALooper.cpp
+++ b/media/libstagefright/foundation/ALooper.cpp
@@ -72,6 +72,10 @@ ALooper::ALooper()
ALooper::~ALooper() {
stop();
+
+ // Since this looper is "dead" (or as good as dead by now),
+ // have ALooperRoster unregister any handlers still registered for it.
+ gLooperRoster.unregisterStaleHandlers();
}
void ALooper::setName(const char *name) {