diff options
author | Chih-Chung Chang <chihchung@google.com> | 2010-03-24 16:38:02 -0700 |
---|---|---|
committer | Chih-Chung Chang <chihchung@google.com> | 2010-03-24 16:45:23 -0700 |
commit | cfea8fda1291feab9b04a1c99824d1a3965782a8 (patch) | |
tree | b2d47b9f3d8e1f26d7bdd628865a53bd92322a1a /libs | |
parent | 478a745e8421497bad9ea0cbd75bc4d4d419ef60 (diff) | |
download | frameworks_base-cfea8fda1291feab9b04a1c99824d1a3965782a8.zip frameworks_base-cfea8fda1291feab9b04a1c99824d1a3965782a8.tar.gz frameworks_base-cfea8fda1291feab9b04a1c99824d1a3965782a8.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 'libs')
-rw-r--r-- | libs/camera/Camera.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/camera/Camera.cpp b/libs/camera/Camera.cpp index 8620e71..f19c502 100644 --- a/libs/camera/Camera.cpp +++ b/libs/camera/Camera.cpp @@ -117,6 +117,7 @@ void Camera::disconnect() LOGV("disconnect"); if (mCamera != 0) { mCamera->disconnect(); + mCamera->asBinder()->unlinkToDeath(this); mCamera = 0; } } |