Closed egimbernat closed 2 years ago
We do not take ownership of the memory. The memory is copied.
Okay, so is safe to reuse allocated memory, for example, cv::Mat? I mean, is copied immediately when calling process
?
Okay, so is safe to reuse allocated memory, for example, cv::Mat? I mean, is copied immediately when calling
process
?
The copy is immediate and you can reuse the memory or delete it. When parallel mode is enabled you don't need to wait for the result.
I'm building a Rust binding for the SDK, so far, the last piece is to understand which memory model to use to send the data pointer to process when is operating in parallel. By https://www.doubango.org/SDKs/anpr/docs/Memory_management_design.html#memory-pooling seems it's covered, but I just want to make sure I'm not assuming that the SDK takes ownership of the pointer and is safe to pass the pointer and not track the object to release the allocated memory.