diff --git a/.vscode/launch.json b/.vscode/launch.json index 74d50f8..a8b3b32 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -15,6 +15,20 @@ "request": "launch", "type": "dart" }, + { + "name": "example (profile mode)", + "cwd": "example", + "request": "launch", + "type": "dart", + "flutterMode": "profile" + }, + { + "name": "example (release mode)", + "cwd": "example", + "request": "launch", + "type": "dart", + "flutterMode": "release" + }, { "name": "ZXScanner", "cwd": "zxscanner", diff --git a/.vscode/settings.json b/.vscode/settings.json index 1ae53cc..17fd283 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,6 +5,7 @@ "__nullptr": "cpp", "codecvt": "cpp", "cmath": "cpp", - "array": "cpp" + "array": "cpp", + "new": "cpp" } } \ No newline at end of file diff --git a/ios/Classes/src/native_zxing.cpp b/ios/Classes/src/native_zxing.cpp index 2f79191..3743ce4 100644 --- a/ios/Classes/src/native_zxing.cpp +++ b/ios/Classes/src/native_zxing.cpp @@ -49,6 +49,9 @@ extern "C" resultToCodeResult(&code, result); } + delete[] data; + delete[] bytes; + int evalInMillis = static_cast(get_now() - start); platform_log("Read Barcode in: %d ms\n", evalInMillis); return code; @@ -84,6 +87,9 @@ extern "C" } } + delete[] data; + delete[] bytes; + int evalInMillis = static_cast(get_now() - start); platform_log("Read Barcode in: %d ms\n", evalInMillis); return {i, codes};