diff options
| author | Akshay Nair <phenax5@gmail.com> | 2024-12-28 21:49:02 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2024-12-28 21:57:01 +0530 |
| commit | 9b5c8368daa97a5b58a378d9c4eab66ebb018cb0 (patch) | |
| tree | 9faec7fbb2da551e02c819cabfedf670b6fc854a /cpp/libchelleport.cpp | |
| parent | d000cbb52821dc33c5d2f3d676dc6efa54f3b25f (diff) | |
| download | chelleport-9b5c8368daa97a5b58a378d9c4eab66ebb018cb0.tar.gz chelleport-9b5c8368daa97a5b58a378d9c4eab66ebb018cb0.zip | |
Fix memory leak issue with c++ interop
Diffstat (limited to 'cpp/libchelleport.cpp')
| -rw-r--r-- | cpp/libchelleport.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cpp/libchelleport.cpp b/cpp/libchelleport.cpp index 53ba64e..010fdd4 100644 --- a/cpp/libchelleport.cpp +++ b/cpp/libchelleport.cpp @@ -13,7 +13,7 @@ extern "C" OCRMatch *findWordCoordinates(const char *image_path, int *size) { OCRMatchSet matches; MEASURE("OCR", { matches = extractTextMatches(image_path); }); - static OCRMatch *ptr = new OCRMatch[matches.size()]; + OCRMatch *ptr = new OCRMatch[matches.size()]; std::copy(matches.begin(), matches.end(), ptr); *size = matches.size(); |
