diff options
author | Patrick Ruoff <c14-radioactive@19e81ba0-9b1a-49c3-bd6c-561e1906d5fb> | 2012-09-21 14:00:34 +0000 |
---|---|---|
committer | Patrick Ruoff <c14-radioactive@19e81ba0-9b1a-49c3-bd6c-561e1906d5fb> | 2012-09-21 14:00:34 +0000 |
commit | ab0d60becc2d1b89c812193c179892d6acd4912f (patch) | |
tree | 2dae7d2c10e1cc3a5bd73ee8ae2ee609c69a1b7b /FaceTrackNoIR/FaceTrackNoIR.cpp | |
parent | ddc63cdda186fe31435fde839c3d5b68040a0d0f (diff) |
RAII-style dll management 1: Replaced autoptr and release with virtual destructors
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@155 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
Diffstat (limited to 'FaceTrackNoIR/FaceTrackNoIR.cpp')
-rw-r--r-- | FaceTrackNoIR/FaceTrackNoIR.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/FaceTrackNoIR/FaceTrackNoIR.cpp b/FaceTrackNoIR/FaceTrackNoIR.cpp index d6fa5ce4..00e3a87c 100644 --- a/FaceTrackNoIR/FaceTrackNoIR.cpp +++ b/FaceTrackNoIR/FaceTrackNoIR.cpp @@ -50,7 +50,10 @@ // Setup the Main Dialog
//
FaceTrackNoIR::FaceTrackNoIR(QWidget *parent, Qt::WFlags flags) :
-QMainWindow(parent, flags)
+QMainWindow(parent, flags),
+pTrackerDialog(NULL),
+pProtocolDialog(NULL),
+pFilterDialog(NULL)
{
cameraDetected = false;
@@ -63,7 +66,6 @@ QMainWindow(parent, flags) _curve_config = 0;
tracker = 0;
- pTrackerDialog = NULL;
// _display = 0;
l = 0;
trayIcon = 0;
@@ -995,7 +997,7 @@ QString libName; // Delete the existing QDialog
//
if (pProtocolDialog) {
- pProtocolDialog.Release();
+ delete pProtocolDialog;
}
// Show the appropriate Protocol-server Settings
@@ -1050,7 +1052,8 @@ QString libName; // Delete the existing QDialog
//
if (pFilterDialog) {
- pFilterDialog.Release();
+ delete pFilterDialog;
+ pFilterDialog = NULL;
}
// Show the appropriate Protocol-server Settings
@@ -1174,7 +1177,8 @@ ITrackerDll *pTrackerDll; // Pointer to Filter info instance (in DLL) // Delete the existing QDialog
//
if (pProtocolDialog) {
- pProtocolDialog.Release();
+ delete pProtocolDialog;
+ pProtocolDialog = NULL;
}
// Show the appropriate Protocol-server Settings
|