diff options
| author | jacob1 <jfu614@gmail.com> | 2013-07-11 23:30:48 (GMT) |
|---|---|---|
| committer | jacob1 <jfu614@gmail.com> | 2013-07-11 23:30:48 (GMT) |
| commit | 4f5c4536439dc546c6ea0a7aadbeb9e481cf8031 (patch) | |
| tree | 86b5e056081a3a55accf455eb12a2de2fbc5ac3f | |
| parent | c29bfd285de0b94b32860b783f686d14dfb8ba15 (diff) | |
| download | powder-4f5c4536439dc546c6ea0a7aadbeb9e481cf8031.zip powder-4f5c4536439dc546c6ea0a7aadbeb9e481cf8031.tar.gz | |
if the previewmodel has exited, the running threads should delete this
| -rw-r--r-- | src/gui/preview/PreviewModel.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/preview/PreviewModel.cpp b/src/gui/preview/PreviewModel.cpp index 8d5d574..34d0c7f 100644 --- a/src/gui/preview/PreviewModel.cpp +++ b/src/gui/preview/PreviewModel.cpp @@ -24,7 +24,10 @@ void * PreviewModel::updateSaveInfoT(void * obj) SaveInfo * tempSave = Client::Ref().GetSave(((threadInfo*)obj)->saveID, ((threadInfo*)obj)->saveDate); ((threadInfo*)obj)->threadFinished = true; if (((threadInfo*)obj)->previewExited && tempSave) + { delete tempSave; + delete obj; + } return tempSave; } @@ -40,6 +43,7 @@ void * PreviewModel::updateSaveDataT(void * obj) delete tempSave; if (tempData) free(tempData); + delete obj; } return tempSave; } @@ -54,6 +58,7 @@ void * PreviewModel::updateSaveCommentsT(void * obj) delete tempComments->at(i); tempComments->clear(); delete tempComments; + delete obj; } return tempComments; } |
