Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dnn: Fix dangling pointers returned by GetLayerNames
'GetLayerNames' returns an array of 'char' pointers to cstrings in a 'vector<string>'; unfortunately, once the vector is out of scope, the strings are destroyed. 'GetLayerNames' callers are then left with dangling pointers. This change fixes the problem by expanding the 'strs' buffer returned by 'GetLayerNames' and copying the vector's cstrings into it.
- Loading branch information