Created
July 3, 2014 01:56
-
-
Save zsh-89/fe3ffef66bad9d9862ba to your computer and use it in GitHub Desktop.
How cv::imshow() breaks _CrtMemDifference()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define _CRTDBG_MAP_ALLOC | |
#include <crtdbg.h> | |
#include <opencv2/opencv.hpp> | |
#include "opencv2/core/core.hpp" | |
#include "opencv2/imgproc/imgproc.hpp" | |
#include "opencv2/calib3d/calib3d.hpp" | |
#include "opencv2/highgui/highgui.hpp" | |
_CrtMemState s1, s2, s3; | |
int main(void) | |
{ | |
_CrtMemCheckpoint( &s1 ); | |
{ | |
cv::Mat xx(100, 100, CV_8UC3); | |
cv::imshow("win title", xx); | |
} | |
_CrtMemCheckpoint( &s2 ); | |
if ( _CrtMemDifference( &s3, &s1, &s2) ) | |
_CrtMemDumpStatistics( &s3 ); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cv::imread() can't break _CrtMemDifference().