Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cfea8fda authored by Chih-Chung Chang's avatar Chih-Chung Chang
Browse files

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
parent 478a745e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -117,6 +117,7 @@ void Camera::disconnect()
    LOGV("disconnect");
    if (mCamera != 0) {
        mCamera->disconnect();
        mCamera->asBinder()->unlinkToDeath(this);
        mCamera = 0;
    }
}