summaryrefslogtreecommitdiffstats
path: root/camera
diff options
context:
space:
mode:
authorChih-Chung Chang <chihchung@google.com>2010-03-24 16:38:02 -0700
committerChih-Chung Chang <chihchung@google.com>2010-03-24 16:45:23 -0700
commitf8ed70a20f8b006539af98c8ad45be9561665f82 (patch)
treeef571dd56440871460b68360524a354c640bff3f /camera
parent246c817c7e4514a34f996a2f38d501b52f617b7e (diff)
downloadframeworks_av-f8ed70a20f8b006539af98c8ad45be9561665f82.zip
frameworks_av-f8ed70a20f8b006539af98c8ad45be9561665f82.tar.gz
frameworks_av-f8ed70a20f8b006539af98c8ad45be9561665f82.tar.bz2
Call unlinkToDeath() when we disconnect the Camera,
so we don't hold the (weak) reference to it, which caused (small) memory leaks. Change-Id: If7d58a354fd38c8bc380946bf227b52988ac5118
Diffstat (limited to 'camera')
-rw-r--r--camera/Camera.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/camera/Camera.cpp b/camera/Camera.cpp
index 8620e71..f19c502 100644
--- a/camera/Camera.cpp
+++ b/camera/Camera.cpp
@@ -117,6 +117,7 @@ void Camera::disconnect()
LOGV("disconnect");
if (mCamera != 0) {
mCamera->disconnect();
+ mCamera->asBinder()->unlinkToDeath(this);
mCamera = 0;
}
}