Skip to content

Commit 62896f8

Browse files
committed
Update main.cpp
1 parent dbc0889 commit 62896f8

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

examples/command-line/main.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ int main(int argc, char *argv[])
192192

193193
for (int i = 0; i < count; i++)
194194
{
195-
CCapturedResult *result = (CCapturedResult *)captureResultArray->GetResult(i);
195+
const CCapturedResult *result = captureResultArray->GetResult(i);
196196
result->GetOriginalImageTag()->GetImageId();
197197
cout << ">>>>>>>>>>>>>>>>> Image " << i + 1 << ":" << endl;
198198
cout << result->GetErrorString() << endl;
@@ -226,9 +226,8 @@ int main(int argc, char *argv[])
226226
}
227227
if (barcodeResult)
228228
barcodeResult->Release();
229-
230-
result->Release();
231229
}
230+
captureResultArray->Release();
232231
}
233232
}
234233

0 commit comments

Comments
 (0)