From f8ed70a20f8b006539af98c8ad45be9561665f82 Mon Sep 17 00:00:00 2001 From: Chih-Chung Chang Date: Wed, 24 Mar 2010 16:38:02 -0700 Subject: 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 --- camera/Camera.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'camera') 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; } } -- cgit v1.1