{"action":"opened","issue":{"url":"https://api.github.com/repos/mshabunin/test2/issues/835","labels_url":"https://api.github.com/repos/mshabunin/test2/issues/835/labels{/name}","comments_url":"https://api.github.com/repos/mshabunin/test2/issues/835/comments","events_url":"https://api.github.com/repos/mshabunin/test2/issues/835/events","html_url":"https://github.com/mshabunin/test2/issues/835","id":96621748,"number":835,"title":"Possible memory leak in cvtColor with TBB support","user":{"login":"opencv-pushbot","id":2051563,"avatar_url":"https://avatars.githubusercontent.com/u/2051563?v=3","gravatar_id":"","url":"https://api.github.com/users/opencv-pushbot","html_url":"https://github.com/opencv-pushbot","followers_url":"https://api.github.com/users/opencv-pushbot/followers","following_url":"https://api.github.com/users/opencv-pushbot/following{/other_user}","gists_url":"https://api.github.com/users/opencv-pushbot/gists{/gist_id}","starred_url":"https://api.github.com/users/opencv-pushbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencv-pushbot/subscriptions","organizations_url":"https://api.github.com/users/opencv-pushbot/orgs","repos_url":"https://api.github.com/users/opencv-pushbot/repos","events_url":"https://api.github.com/users/opencv-pushbot/events{/privacy}","received_events_url":"https://api.github.com/users/opencv-pushbot/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mshabunin/test2/labels/affected:%202.4","name":"affected: 2.4","color":"ededed"},{"url":"https://api.github.com/repos/mshabunin/test2/labels/auto-transferred","name":"auto-transferred","color":"ededed"},{"url":"https://api.github.com/repos/mshabunin/test2/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/mshabunin/test2/labels/category:%20none","name":"category: none","color":"ededed"},{"url":"https://api.github.com/repos/mshabunin/test2/labels/priority:%20normal","name":"priority: normal","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-22T17:26:12Z","updated_at":"2015-07-22T17:26:12Z","closed_at":null,"body":"Transferred from http://code.opencv.org/issues/4489\r\n```\n|| Guilherme Fôlego on 2015-07-20 14:16\n|| Priority: Normal\n|| Affected: 2.4.9 (latest release)\n|| Category: None\n|| Tracker: Bug\n|| Difficulty: \n|| PR: \n|| Platform: x64 / Linux\n```\n\nPossible memory leak in cvtColor with TBB support\n-----------\n```\nI'm running some tests with cvtColor and valgrind reports a memory leak.\r\nThe original post is here: http://answers.opencv.org/question/66185\r\n\r\nMy first test was using OpenCV 2.4.8 that ships with Ubuntu 14.04.2 LTS (apt-get).\r\nMy second test was using OpenCV 2.4.11 from GitHub (https://github.com/Itseez/opencv/archive/2.4.11.zip), which seems to be the latest 2.4 release. So I was not sure which \"Affected version\" to select.\r\n\r\n\r\nSome information about the environment:\r\n\r\n<pre>\r\n$ lsb_release -a\r\nNo LSB modules are available.\r\nDistributor ID: Ubuntu\r\nDescription:    Ubuntu 14.04.2 LTS\r\nRelease:    14.04\r\nCodename:   trusty\r\n\r\n$ uname --all\r\nLinux <hidden> 3.16.0-34-generic #47~14.04.1-Ubuntu SMP Fri Apr 10 17:49:16 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux\r\n\r\n$ g++ --version\r\ng++ (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4\r\nCopyright (C) 2013 Free Software Foundation, Inc.\r\nThis is free software; see the source for copying conditions.  There is NO\r\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r\n\r\n$ valgrind --version\r\nvalgrind-3.10.0.SVN\r\n</pre>\r\n\r\nThis is a short standalone sample:\r\n\r\n<pre>\r\n$ cat test.cpp\r\n#include <iostream>\r\n#include <opencv2/core/core.hpp>\r\n#include <opencv2/imgproc/imgproc.hpp>\r\n\r\nint main()\r\n{\r\n    std::cout << cv::getBuildInformation() << std::endl;\r\n\r\n    cv::Mat src = cv::Mat::zeros(5, 5, CV_8UC3);\r\n    cv::Mat dst;\r\n\r\n    cv::cvtColor( src, dst, CV_BGR2GRAY );\r\n}\r\n</pre>\r\n\r\n\r\nBuilding OpenCV 2.4.11:\r\n\r\n<pre>\r\n$ cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=<opencv_install_path> ..\r\n$ make -j9\r\n$ make -j9 install\r\n</pre>\r\n\r\nBuilding sample:\r\n\r\n<pre>\r\n$ g++ -Wall -Wextra -Werror -Weffc++ -ansi -pedantic -O2 test.cpp -o test -I<opencv_install_path>/include/opencv <opencv_install_path>/lib/libopencv_core.so <opencv_install_path>/lib/libopencv_imgproc.so\r\n</pre>\r\n\r\nAnd the output:\r\n\r\n<pre>\r\n$ LD_LIBRARY_PATH=<opencv_install_path>/lib/:$LD_LIBRARY_PATH valgrind --leak-check=full ./test\r\n==18997== Memcheck, a memory error detector\r\n==18997== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.\r\n==18997== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info\r\n==18997== Command: ./test\r\n==18997== \r\n\r\nGeneral configuration for OpenCV 2.4.11 =====================================\r\n  Version control:               unknown\r\n\r\n  Platform:\r\n    Host:                        Linux 3.16.0-34-generic x86_64\r\n    CMake:                       2.8.12.2\r\n    CMake generator:             Unix Makefiles\r\n    CMake build tool:            /usr/bin/make\r\n    Configuration:               RELEASE\r\n\r\n  C/C++:\r\n    Built as dynamic libs?:      YES\r\n    C++ Compiler:                /usr/bin/c++  (ver 4.8.4)\r\n    C++ flags (Release):         -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG  -DNDEBUG\r\n    C++ flags (Debug):           -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g  -O0 -DDEBUG -D_DEBUG\r\n    C Compiler:                  /usr/bin/cc\r\n    C flags (Release):           -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG  -DNDEBUG\r\n    C flags (Debug):             -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g  -O0 -DDEBUG -D_DEBUG\r\n    Linker flags (Release):      \r\n    Linker flags (Debug):        \r\n    Precompiled headers:         YES\r\n\r\n  OpenCV modules:\r\n    To be built:                 core flann imgproc highgui features2d calib3d ml video legacy objdetect photo gpu ocl nonfree contrib java python stitching superres ts videostab\r\n    Disabled:                    world\r\n    Disabled by dependency:      -\r\n    Unavailable:                 androidcamera dynamicuda viz\r\n\r\n  GUI: \r\n    QT:                          NO\r\n    GTK+ 2.x:                    YES (ver 2.24.23)\r\n    GThread :                    YES (ver 2.40.2)\r\n    GtkGlExt:                    NO\r\n    OpenGL support:              NO\r\n    VTK support:                 NO\r\n\r\n  Media I/O: \r\n    ZLib:                        /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.8)\r\n    JPEG:                        /usr/lib/x86_64-linux-gnu/libjpeg.so (ver )\r\n    PNG:                         /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.2.50)\r\n    TIFF:                        /usr/lib/x86_64-linux-gnu/libtiff.so (ver 42 - 4.0.3)\r\n    JPEG 2000:                   /usr/lib/x86_64-linux-gnu/libjasper.so (ver 1.900.1)\r\n    OpenEXR:                     /usr/lib/x86_64-linux-gnu/libImath.so /usr/lib/x86_64-linux-gnu/libIlmImf.so /usr/lib/x86_64-linux-gnu/libIex.so /usr/lib/x86_64-linux-gnu/libHalf.so /usr/lib/x86_64-linux-gnu/libIlmThread.so (ver 1.6.1)\r\n\r\n  Video I/O:\r\n    DC1394 1.x:                  NO\r\n    DC1394 2.x:                  YES (ver 2.2.1)\r\n    FFMPEG:                      YES\r\n      codec:                     YES (ver 54.35.0)\r\n      format:                    YES (ver 54.20.4)\r\n      util:                      YES (ver 52.3.0)\r\n      swscale:                   YES (ver 2.1.1)\r\n      gentoo-style:              YES\r\n    GStreamer:                   \r\n      base:                      YES (ver 0.10.36)\r\n      video:                     YES (ver 0.10.36)\r\n      app:                       YES (ver 0.10.36)\r\n      riff:                      YES (ver 0.10.36)\r\n      pbutils:                   YES (ver 0.10.36)\r\n    OpenNI:                      NO\r\n    OpenNI PrimeSensor Modules:  NO\r\n    PvAPI:                       NO\r\n    GigEVisionSDK:               NO\r\n    UniCap:                      NO\r\n    UniCap ucil:                 NO\r\n    V4L/V4L2:                    Using libv4l1 (ver 1.0.1) / libv4l2 (ver 1.0.1)\r\n    XIMEA:                       NO\r\n    Xine:                        NO\r\n\r\n  Other third-party libraries:\r\n    Use IPP:                     NO\r\n    Use Eigen:                   YES (ver 3.2.0)\r\n    Use TBB:                     NO\r\n    Use OpenMP:                  NO\r\n    Use GCD                      NO\r\n    Use Concurrency              NO\r\n    Use C=:                      NO\r\n    Use Cuda:                    NO\r\n    Use OpenCL:                  YES\r\n\r\n  OpenCL:\r\n    Version:                     dynamic\r\n    Include path:                /home/gfolego/packages/opencv-2.4.11/3rdparty/include/opencl/1.2\r\n    Use AMD FFT:                 NO\r\n    Use AMD BLAS:                NO\r\n\r\n  Python:\r\n    Interpreter:                 /usr/bin/python2 (ver 2.7.6)\r\n    Libraries:                   /usr/lib/x86_64-linux-gnu/libpython2.7.so (ver 2.7.6)\r\n    numpy:                       /usr/local/lib/python2.7/dist-packages/numpy/core/include (ver 1.9.2)\r\n    packages path:               lib/python2.7/dist-packages\r\n\r\n  Java:\r\n    ant:                         /usr/bin/ant (ver 1.9.3)\r\n    JNI:                         /usr/lib/jvm/default-java/include /usr/lib/jvm/default-java/include /usr/lib/jvm/default-java/include\r\n    Java tests:                  YES\r\n\r\n  Documentation:\r\n    Build Documentation:         NO\r\n    Sphinx:                      NO\r\n    PdfLaTeX compiler:           /usr/bin/pdflatex\r\n    Doxygen:                     YES (/usr/bin/doxygen)\r\n\r\n  Tests and samples:\r\n    Tests:                       YES\r\n    Performance tests:           YES\r\n    C/C++ Examples:              NO\r\n\r\n  Install path:                  /home/gfolego/packages/opencv-2.4.11/release/installed\r\n\r\n  cvconfig.h is in:              /home/gfolego/packages/opencv-2.4.11/release\r\n-----------------------------------------------------------------\r\n\r\n\r\n==18997== \r\n==18997== HEAP SUMMARY:\r\n==18997==     in use at exit: 0 bytes in 0 blocks\r\n==18997==   total heap usage: 27 allocs, 27 frees, 10,961 bytes allocated\r\n==18997== \r\n==18997== All heap blocks were freed -- no leaks are possible\r\n==18997== \r\n==18997== For counts of detected and suppressed errors, rerun with: -v\r\n==18997== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)\r\n</pre>\r\n\r\nNow, building OpenCV 2.4.11 with TBB support:\r\n\r\n<pre>\r\n$ cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=<opencv_install_path> -D WITH_TBB=ON ..\r\n$ make -j9\r\n$ make -j9 install\r\n</pre>\r\n\r\nBuilding the sample with the new library:\r\n\r\n<pre>\r\n$ g++ -Wall -Wextra -Werror -Weffc++ -ansi -pedantic -O2 test.cpp -o test -I<opencv_install_path>/include/opencv <opencv_install_path>/lib/libopencv_core.so <opencv_install_path>/lib/libopencv_imgproc.so\r\n</pre>\r\n\r\nAnd the new output:\r\n\r\n<pre>\r\n$ LD_LIBRARY_PATH=/home/gfolego/packages/opencv-2.4.11/release/installed/lib/:$LD_LIBRARY_PATH valgrind --leak-check=full ./test \r\n==31226== Memcheck, a memory error detector\r\n==31226== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.\r\n==31226== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info\r\n==31226== Command: ./test\r\n==31226== \r\n\r\nGeneral configuration for OpenCV 2.4.11 =====================================\r\n  Version control:               unknown\r\n\r\n  Platform:\r\n    Host:                        Linux 3.16.0-34-generic x86_64\r\n    CMake:                       2.8.12.2\r\n    CMake generator:             Unix Makefiles\r\n    CMake build tool:            /usr/bin/make\r\n    Configuration:               RELEASE\r\n\r\n  C/C++:\r\n    Built as dynamic libs?:      YES\r\n    C++ Compiler:                /usr/bin/c++  (ver 4.8.4)\r\n    C++ flags (Release):         -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG  -DNDEBUG\r\n    C++ flags (Debug):           -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g  -O0 -DDEBUG -D_DEBUG\r\n    C Compiler:                  /usr/bin/cc\r\n    C flags (Release):           -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG  -DNDEBUG\r\n    C flags (Debug):             -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g  -O0 -DDEBUG -D_DEBUG\r\n    Linker flags (Release):      \r\n    Linker flags (Debug):        \r\n    Precompiled headers:         YES\r\n\r\n  OpenCV modules:\r\n    To be built:                 core flann imgproc highgui features2d calib3d ml video legacy objdetect photo gpu ocl nonfree contrib java python stitching superres ts videostab\r\n    Disabled:                    world\r\n    Disabled by dependency:      -\r\n    Unavailable:                 androidcamera dynamicuda viz\r\n\r\n  GUI: \r\n    QT:                          NO\r\n    GTK+ 2.x:                    YES (ver 2.24.23)\r\n    GThread :                    YES (ver 2.40.2)\r\n    GtkGlExt:                    NO\r\n    OpenGL support:              NO\r\n    VTK support:                 NO\r\n\r\n  Media I/O: \r\n    ZLib:                        /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.8)\r\n    JPEG:                        /usr/lib/x86_64-linux-gnu/libjpeg.so (ver )\r\n    PNG:                         /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.2.50)\r\n    TIFF:                        /usr/lib/x86_64-linux-gnu/libtiff.so (ver 42 - 4.0.3)\r\n    JPEG 2000:                   /usr/lib/x86_64-linux-gnu/libjasper.so (ver 1.900.1)\r\n    OpenEXR:                     /usr/lib/x86_64-linux-gnu/libImath.so /usr/lib/x86_64-linux-gnu/libIlmImf.so /usr/lib/x86_64-linux-gnu/libIex.so /usr/lib/x86_64-linux-gnu/libHalf.so /usr/lib/x86_64-linux-gnu/libIlmThread.so (ver 1.6.1)\r\n\r\n  Video I/O:\r\n    DC1394 1.x:                  NO\r\n    DC1394 2.x:                  YES (ver 2.2.1)\r\n    FFMPEG:                      YES\r\n      codec:                     YES (ver 54.35.0)\r\n      format:                    YES (ver 54.20.4)\r\n      util:                      YES (ver 52.3.0)\r\n      swscale:                   YES (ver 2.1.1)\r\n      gentoo-style:              YES\r\n    GStreamer:                   \r\n      base:                      YES (ver 0.10.36)\r\n      video:                     YES (ver 0.10.36)\r\n      app:                       YES (ver 0.10.36)\r\n      riff:                      YES (ver 0.10.36)\r\n      pbutils:                   YES (ver 0.10.36)\r\n    OpenNI:                      NO\r\n    OpenNI PrimeSensor Modules:  NO\r\n    PvAPI:                       NO\r\n    GigEVisionSDK:               NO\r\n    UniCap:                      NO\r\n    UniCap ucil:                 NO\r\n    V4L/V4L2:                    Using libv4l1 (ver 1.0.1) / libv4l2 (ver 1.0.1)\r\n    XIMEA:                       NO\r\n    Xine:                        NO\r\n\r\n  Other third-party libraries:\r\n    Use IPP:                     NO\r\n    Use Eigen:                   YES (ver 3.2.0)\r\n    Use TBB:                     YES (ver 4.2 interface 7000)\r\n    Use OpenMP:                  NO\r\n    Use GCD                      NO\r\n    Use Concurrency              NO\r\n    Use C=:                      NO\r\n    Use Cuda:                    NO\r\n    Use OpenCL:                  YES\r\n\r\n  OpenCL:\r\n    Version:                     dynamic\r\n    Include path:                /home/gfolego/packages/opencv-2.4.11/3rdparty/include/opencl/1.2\r\n    Use AMD FFT:                 NO\r\n    Use AMD BLAS:                NO\r\n\r\n  Python:\r\n    Interpreter:                 /usr/bin/python2 (ver 2.7.6)\r\n    Libraries:                   /usr/lib/x86_64-linux-gnu/libpython2.7.so (ver 2.7.6)\r\n    numpy:                       /usr/local/lib/python2.7/dist-packages/numpy/core/include (ver 1.9.2)\r\n    packages path:               lib/python2.7/dist-packages\r\n\r\n  Java:\r\n    ant:                         /usr/bin/ant (ver 1.9.3)\r\n    JNI:                         /usr/lib/jvm/default-java/include /usr/lib/jvm/default-java/include /usr/lib/jvm/default-java/include\r\n    Java tests:                  YES\r\n\r\n  Documentation:\r\n    Build Documentation:         NO\r\n    Sphinx:                      NO\r\n    PdfLaTeX compiler:           /usr/bin/pdflatex\r\n    Doxygen:                     YES (/usr/bin/doxygen)\r\n\r\n  Tests and samples:\r\n    Tests:                       YES\r\n    Performance tests:           YES\r\n    C/C++ Examples:              NO\r\n\r\n  Install path:                  /home/gfolego/packages/opencv-2.4.11/release/installed\r\n\r\n  cvconfig.h is in:              /home/gfolego/packages/opencv-2.4.11/release\r\n-----------------------------------------------------------------\r\n\r\n\r\n==31226== \r\n==31226== HEAP SUMMARY:\r\n==31226==     in use at exit: 24,160 bytes in 60 blocks\r\n==31226==   total heap usage: 92 allocs, 32 frees, 36,209 bytes allocated\r\n==31226== \r\n==31226== 192 bytes in 1 blocks are possibly lost in loss record 1 of 12\r\n==31226==    at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)\r\n==31226==    by 0x671195B: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6711B70: tbb::internal::NFS_Allocate(unsigned long, unsigned long, void*) (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6716339: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6719175: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x671987D: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6719994: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6719AE4: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6719359: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6717800: tbb::internal::allocate_root_with_context_proxy::allocate(unsigned long) const (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x4F77CF9: cv::parallel_for_(cv::Range const&, cv::ParallelLoopBody const&, double) (in /home/gfolego/packages/opencv-2.4.11/release/installed/lib/libopencv_core.so.2.4.11)\r\n==31226==    by 0x54A6B94: void cv::CvtColorLoop<cv::RGB2Gray<unsigned char> >(cv::Mat const&, cv::Mat&, cv::RGB2Gray<unsigned char> const&) (in /home/gfolego/packages/opencv-2.4.11/release/installed/lib/libopencv_imgproc.so.2.4.11)\r\n==31226== \r\n==31226== 384 bytes in 1 blocks are possibly lost in loss record 2 of 12\r\n==31226==    at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)\r\n==31226==    by 0x671195B: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6711B70: tbb::internal::NFS_Allocate(unsigned long, unsigned long, void*) (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6719971: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6719AE4: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6719359: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6717800: tbb::internal::allocate_root_with_context_proxy::allocate(unsigned long) const (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x4F77CF9: cv::parallel_for_(cv::Range const&, cv::ParallelLoopBody const&, double) (in /home/gfolego/packages/opencv-2.4.11/release/installed/lib/libopencv_core.so.2.4.11)\r\n==31226==    by 0x54A6B94: void cv::CvtColorLoop<cv::RGB2Gray<unsigned char> >(cv::Mat const&, cv::Mat&, cv::RGB2Gray<unsigned char> const&) (in /home/gfolego/packages/opencv-2.4.11/release/installed/lib/libopencv_imgproc.so.2.4.11)\r\n==31226==    by 0x54B846D: cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int) (in /home/gfolego/packages/opencv-2.4.11/release/installed/lib/libopencv_imgproc.so.2.4.11)\r\n==31226==    by 0x400E78: main (in /home/gfolego/projects/test/test)\r\n==31226== \r\n==31226== 384 bytes in 1 blocks are possibly lost in loss record 3 of 12\r\n==31226==    at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)\r\n==31226==    by 0x671195B: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6711B70: tbb::internal::NFS_Allocate(unsigned long, unsigned long, void*) (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x671B3F8: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x671B5BD: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6719B02: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6719359: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6717800: tbb::internal::allocate_root_with_context_proxy::allocate(unsigned long) const (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x4F77CF9: cv::parallel_for_(cv::Range const&, cv::ParallelLoopBody const&, double) (in /home/gfolego/packages/opencv-2.4.11/release/installed/lib/libopencv_core.so.2.4.11)\r\n==31226==    by 0x54A6B94: void cv::CvtColorLoop<cv::RGB2Gray<unsigned char> >(cv::Mat const&, cv::Mat&, cv::RGB2Gray<unsigned char> const&) (in /home/gfolego/packages/opencv-2.4.11/release/installed/lib/libopencv_imgproc.so.2.4.11)\r\n==31226==    by 0x54B846D: cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int) (in /home/gfolego/packages/opencv-2.4.11/release/installed/lib/libopencv_imgproc.so.2.4.11)\r\n==31226==    by 0x400E78: main (in /home/gfolego/projects/test/test)\r\n==31226== \r\n==31226== 384 bytes in 1 blocks are possibly lost in loss record 4 of 12\r\n==31226==    at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)\r\n==31226==    by 0x671195B: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6711B70: tbb::internal::NFS_Allocate(unsigned long, unsigned long, void*) (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x671BD97: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x671BEF4: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x671D720: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x671C811: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6719361: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6717800: tbb::internal::allocate_root_with_context_proxy::allocate(unsigned long) const (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x4F77CF9: cv::parallel_for_(cv::Range const&, cv::ParallelLoopBody const&, double) (in /home/gfolego/packages/opencv-2.4.11/release/installed/lib/libopencv_core.so.2.4.11)\r\n==31226==    by 0x54A6B94: void cv::CvtColorLoop<cv::RGB2Gray<unsigned char> >(cv::Mat const&, cv::Mat&, cv::RGB2Gray<unsigned char> const&) (in /home/gfolego/packages/opencv-2.4.11/release/installed/lib/libopencv_imgproc.so.2.4.11)\r\n==31226==    by 0x54B846D: cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int) (in /home/gfolego/packages/opencv-2.4.11/release/installed/lib/libopencv_imgproc.so.2.4.11)\r\n==31226== \r\n==31226== 384 bytes in 1 blocks are possibly lost in loss record 5 of 12\r\n==31226==    at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)\r\n==31226==    by 0x671195B: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6711B70: tbb::internal::NFS_Allocate(unsigned long, unsigned long, void*) (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x671BD97: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6717786: tbb::internal::allocate_root_with_context_proxy::allocate(unsigned long) const (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x4F77CF9: cv::parallel_for_(cv::Range const&, cv::ParallelLoopBody const&, double) (in /home/gfolego/packages/opencv-2.4.11/release/installed/lib/libopencv_core.so.2.4.11)\r\n==31226==    by 0x54A6B94: void cv::CvtColorLoop<cv::RGB2Gray<unsigned char> >(cv::Mat const&, cv::Mat&, cv::RGB2Gray<unsigned char> const&) (in /home/gfolego/packages/opencv-2.4.11/release/installed/lib/libopencv_imgproc.so.2.4.11)\r\n==31226==    by 0x54B846D: cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int) (in /home/gfolego/packages/opencv-2.4.11/release/installed/lib/libopencv_imgproc.so.2.4.11)\r\n==31226==    by 0x400E78: main (in /home/gfolego/projects/test/test)\r\n==31226== \r\n==31226== 384 bytes in 1 blocks are possibly lost in loss record 6 of 12\r\n==31226==    at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)\r\n==31226==    by 0x671195B: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6711B70: tbb::internal::NFS_Allocate(unsigned long, unsigned long, void*) (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x671BD97: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x671CF12: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x4F77D50: cv::parallel_for_(cv::Range const&, cv::ParallelLoopBody const&, double) (in /home/gfolego/packages/opencv-2.4.11/release/installed/lib/libopencv_core.so.2.4.11)\r\n==31226==    by 0x54A6B94: void cv::CvtColorLoop<cv::RGB2Gray<unsigned char> >(cv::Mat const&, cv::Mat&, cv::RGB2Gray<unsigned char> const&) (in /home/gfolego/packages/opencv-2.4.11/release/installed/lib/libopencv_imgproc.so.2.4.11)\r\n==31226==    by 0x54B846D: cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int) (in /home/gfolego/packages/opencv-2.4.11/release/installed/lib/libopencv_imgproc.so.2.4.11)\r\n==31226==    by 0x400E78: main (in /home/gfolego/projects/test/test)\r\n==31226== \r\n==31226== 520 bytes in 1 blocks are possibly lost in loss record 7 of 12\r\n==31226==    at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)\r\n==31226==    by 0x671195B: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6711B70: tbb::internal::NFS_Allocate(unsigned long, unsigned long, void*) (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x671D70A: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x671C811: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6719361: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6717800: tbb::internal::allocate_root_with_context_proxy::allocate(unsigned long) const (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x4F77CF9: cv::parallel_for_(cv::Range const&, cv::ParallelLoopBody const&, double) (in /home/gfolego/packages/opencv-2.4.11/release/installed/lib/libopencv_core.so.2.4.11)\r\n==31226==    by 0x54A6B94: void cv::CvtColorLoop<cv::RGB2Gray<unsigned char> >(cv::Mat const&, cv::Mat&, cv::RGB2Gray<unsigned char> const&) (in /home/gfolego/packages/opencv-2.4.11/release/installed/lib/libopencv_imgproc.so.2.4.11)\r\n==31226==    by 0x54B846D: cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int) (in /home/gfolego/packages/opencv-2.4.11/release/installed/lib/libopencv_imgproc.so.2.4.11)\r\n==31226==    by 0x400E78: main (in /home/gfolego/projects/test/test)\r\n==31226== \r\n==31226== 1,024 bytes in 1 blocks are possibly lost in loss record 8 of 12\r\n==31226==    at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)\r\n==31226==    by 0x671195B: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6711B70: tbb::internal::NFS_Allocate(unsigned long, unsigned long, void*) (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6715CC1: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x671634C: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6719175: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x671987D: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6719994: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6719AE4: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6719359: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6717800: tbb::internal::allocate_root_with_context_proxy::allocate(unsigned long) const (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x4F77CF9: cv::parallel_for_(cv::Range const&, cv::ParallelLoopBody const&, double) (in /home/gfolego/packages/opencv-2.4.11/release/installed/lib/libopencv_core.so.2.4.11)\r\n==31226== \r\n==31226== 1,536 bytes in 24 blocks are possibly lost in loss record 9 of 12\r\n==31226==    at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)\r\n==31226==    by 0x6711BC9: tbb::internal::allocate_via_handler_v3(unsigned long) (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x671B2CB: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x671B5BD: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6719B02: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6719359: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6717800: tbb::internal::allocate_root_with_context_proxy::allocate(unsigned long) const (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x4F77CF9: cv::parallel_for_(cv::Range const&, cv::ParallelLoopBody const&, double) (in /home/gfolego/packages/opencv-2.4.11/release/installed/lib/libopencv_core.so.2.4.11)\r\n==31226==    by 0x54A6B94: void cv::CvtColorLoop<cv::RGB2Gray<unsigned char> >(cv::Mat const&, cv::Mat&, cv::RGB2Gray<unsigned char> const&) (in /home/gfolego/packages/opencv-2.4.11/release/installed/lib/libopencv_imgproc.so.2.4.11)\r\n==31226==    by 0x54B846D: cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int) (in /home/gfolego/packages/opencv-2.4.11/release/installed/lib/libopencv_imgproc.so.2.4.11)\r\n==31226==    by 0x400E78: main (in /home/gfolego/projects/test/test)\r\n==31226== \r\n==31226== 3,096 bytes in 3 blocks are possibly lost in loss record 10 of 12\r\n==31226==    at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)\r\n==31226==    by 0x671B23B: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x671B5BD: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6719B02: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6719359: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6717800: tbb::internal::allocate_root_with_context_proxy::allocate(unsigned long) const (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x4F77CF9: cv::parallel_for_(cv::Range const&, cv::ParallelLoopBody const&, double) (in /home/gfolego/packages/opencv-2.4.11/release/installed/lib/libopencv_core.so.2.4.11)\r\n==31226==    by 0x54A6B94: void cv::CvtColorLoop<cv::RGB2Gray<unsigned char> >(cv::Mat const&, cv::Mat&, cv::RGB2Gray<unsigned char> const&) (in /home/gfolego/packages/opencv-2.4.11/release/installed/lib/libopencv_imgproc.so.2.4.11)\r\n==31226==    by 0x54B846D: cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int) (in /home/gfolego/packages/opencv-2.4.11/release/installed/lib/libopencv_imgproc.so.2.4.11)\r\n==31226==    by 0x400E78: main (in /home/gfolego/projects/test/test)\r\n==31226== \r\n==31226== 3,584 bytes in 1 blocks are possibly lost in loss record 11 of 12\r\n==31226==    at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)\r\n==31226==    by 0x671195B: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6711B70: tbb::internal::NFS_Allocate(unsigned long, unsigned long, void*) (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x671B594: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6719B02: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6719359: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6717800: tbb::internal::allocate_root_with_context_proxy::allocate(unsigned long) const (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x4F77CF9: cv::parallel_for_(cv::Range const&, cv::ParallelLoopBody const&, double) (in /home/gfolego/packages/opencv-2.4.11/release/installed/lib/libopencv_core.so.2.4.11)\r\n==31226==    by 0x54A6B94: void cv::CvtColorLoop<cv::RGB2Gray<unsigned char> >(cv::Mat const&, cv::Mat&, cv::RGB2Gray<unsigned char> const&) (in /home/gfolego/packages/opencv-2.4.11/release/installed/lib/libopencv_imgproc.so.2.4.11)\r\n==31226==    by 0x54B846D: cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int) (in /home/gfolego/packages/opencv-2.4.11/release/installed/lib/libopencv_imgproc.so.2.4.11)\r\n==31226==    by 0x400E78: main (in /home/gfolego/projects/test/test)\r\n==31226== \r\n==31226== 12,288 bytes in 24 blocks are possibly lost in loss record 12 of 12\r\n==31226==    at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)\r\n==31226==    by 0x6711BC9: tbb::internal::allocate_via_handler_v3(unsigned long) (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x671B2EC: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x671B5BD: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6719B02: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6719359: ??? (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x6717800: tbb::internal::allocate_root_with_context_proxy::allocate(unsigned long) const (in /usr/lib/libtbb.so.2)\r\n==31226==    by 0x4F77CF9: cv::parallel_for_(cv::Range const&, cv::ParallelLoopBody const&, double) (in /home/gfolego/packages/opencv-2.4.11/release/installed/lib/libopencv_core.so.2.4.11)\r\n==31226==    by 0x54A6B94: void cv::CvtColorLoop<cv::RGB2Gray<unsigned char> >(cv::Mat const&, cv::Mat&, cv::RGB2Gray<unsigned char> const&) (in /home/gfolego/packages/opencv-2.4.11/release/installed/lib/libopencv_imgproc.so.2.4.11)\r\n==31226==    by 0x54B846D: cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int) (in /home/gfolego/packages/opencv-2.4.11/release/installed/lib/libopencv_imgproc.so.2.4.11)\r\n==31226==    by 0x400E78: main (in /home/gfolego/projects/test/test)\r\n==31226== \r\n==31226== LEAK SUMMARY:\r\n==31226==    definitely lost: 0 bytes in 0 blocks\r\n==31226==    indirectly lost: 0 bytes in 0 blocks\r\n==31226==      possibly lost: 24,160 bytes in 60 blocks\r\n==31226==    still reachable: 0 bytes in 0 blocks\r\n==31226==         suppressed: 0 bytes in 0 blocks\r\n==31226== \r\n==31226== For counts of detected and suppressed errors, rerun with: -v\r\n==31226== ERROR SUMMARY: 12 errors from 12 contexts (suppressed: 0 from 0)\r\n</pre>\n```\n\nHistory\n-------"}}