Fix some memory leaks.

Adjusted a unit test or two to make leaks easier to find, and then fixed
a few leaks.

Change-Id: I47a20df8de7cac113d34a2015f76a65ab957dedd
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
This commit is contained in:
Michael Goddard
2012-03-05 11:00:10 +10:00
committed by Qt by Nokia
parent 707be63361
commit 362e443896
7 changed files with 18 additions and 5 deletions

View File

@@ -216,6 +216,8 @@ QCameraExposure::~QCameraExposure()
Q_D(QCameraExposure);
if (d->exposureControl)
d->camera->service()->releaseControl(d->exposureControl);
delete d;
}
/*!

View File

@@ -394,6 +394,7 @@ QCameraFocus::QCameraFocus(QCamera *camera):
QCameraFocus::~QCameraFocus()
{
delete d_ptr;
}
/*!

View File

@@ -178,6 +178,8 @@ QCameraImageCapture::~QCameraImageCapture()
if (d->mediaObject)
d->mediaObject->unbind(this);
delete d_ptr;
}
/*!

View File

@@ -162,6 +162,7 @@ QCameraImageProcessing::QCameraImageProcessing(QCamera *camera):
QCameraImageProcessing::~QCameraImageProcessing()
{
delete d_ptr;
}

View File

@@ -101,6 +101,7 @@ QMediaRecorderPrivate::QMediaRecorderPrivate():
videoControl(0),
metaDataControl(0),
availabilityControl(0),
settingsChanged(false),
notifyTimer(0),
state(QMediaRecorder::StoppedState),
error(QMediaRecorder::NoError)
@@ -146,6 +147,7 @@ void QMediaRecorderPrivate::_q_serviceDestroyed()
videoControl = 0;
metaDataControl = 0;
availabilityControl = 0;
settingsChanged = true;
}
void QMediaRecorderPrivate::_q_updateActualLocation(const QUrl &location)
@@ -249,6 +251,7 @@ QMediaRecorder::QMediaRecorder(QMediaRecorderPrivate &dd, QMediaObject *mediaObj
QMediaRecorder::~QMediaRecorder()
{
delete d_ptr;
}
/*!