You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the portion of the code that is buggy in ycbcr_rgb.cpp
af_array ch1Temp=0, ch2Temp=0, ch3Temp=0;
AF_CHECK(af_index(&ch1Temp, in, 4, slice1));
AF_CHECK(af_index(&ch2Temp, in, 4, slice2));
AF_CHECK(af_index(&ch3Temp, in, 4, slice3));
// get Array objects for corresponding channel views
Array<T> X = getArray<T>(ch1Temp);
Array<T> Y = getArray<T>(ch2Temp);
Array<T> Z = getArray<T>(ch3Temp);
getArray is not a dereference, it is a shallow copy. So the reference count is incremented. You will need to free ch{1,2,3}Temp.
A better solution would be to call createSubArray with the right indices instead of calling af_index.
Activity
pavanky commentedon Dec 14, 2016
@9prady9
This is the portion of the code that is buggy in ycbcr_rgb.cpp
getArrayis not a dereference, it is a shallow copy. So the reference count is incremented. You will need to free ch{1,2,3}Temp.A better solution would be to call
createSubArraywith the right indices instead of callingaf_index.Can you please fix this along with #1666
shehzan10 commentedon Dec 19, 2016
Fixed in hotfix-3.4.2