Incorrect memory handling in tutorial code (chapter: OpenCV iOS - Image Processing) (Bug #3318)
Description
In the example code located at: http://docs.opencv.org/trunk/doc/tutorials/ios/image_manipulation/image_manipulation.html
The example code tries to release code that have not been retained using a call to CGColorSpaceRelease(colorSpace); Memory handling fundamentals for Core Foundation clearly says that you should not release anything if you have not created it yourself.
See bottom of page: https://developer.apple.com/library/ios/documentation/graphicsimaging/conceptual/drawingwithquartz2d/dq_overview/dq_overview.html for details.
Remedy: remove call to CGColorSpaceRelease(..).
Bug in 3.0 documentation but probably exists before that to.
Associated revisions
Removed incorrect release of obtained colorspace. This fixes bug #3318 (updated commit for 2.4 branch)
Merge pull request #3318 from akarsakov:ocl_cvtcolor
History
Updated by Maria Dimashova over 11 years ago
Samuel, thanks for the bug report!
It would be great if you fix the bug and open pull request here Could you please do this to help OpenCV team?
Updated by Samuel Wejeus over 11 years ago
Ok. WIll do.
Updated by Dmitry Retinskiy over 11 years ago
- Status changed from New to Done
- Assignee deleted (
Alexander Shishkov) - Pull request set to https://github.com/Itseez/opencv/pull/1671
- % Done changed from 0 to 100