I think I have a fix, but haven't tested it much. Can someone tell me if changing the function below in sikuli-script/src/main/native/template-matcher.cc works, it's ok for me...
DownsampleTemplateMatcher::~DownsampleTemplateMatcher(){
dout << "~DownsampleTemplateMatcher" << endl;
if (img_){
cvReleaseImage(&img_);
}
if (tpl_){
cvReleaseImage(&tpl_);
}
}
DownsampleTemplateMatcher() creates an image via cvresize but never releases it, in other classes img_, tpl_ are passed in from other functions so they don't need to be released? Maybe a clearer fix would be to put these away in extra class members to be freed later.
I think I have a fix, but haven't tested it much. Can someone tell me if changing the function below in sikuli- script/ src/main/ native/ template- matcher. cc works, it's ok for me...
DownsampleTempl ateMatcher: :~DownsampleTem plateMatcher( ){ plateMatcher" << endl; age(&img_ ); age(&tpl_ );
dout << "~DownsampleTem
if (img_){
cvReleaseIm
}
if (tpl_){
cvReleaseIm
}
}
DownsampleTempl ateMatcher( ) creates an image via cvresize but never releases it, in other classes img_, tpl_ are passed in from other functions so they don't need to be released? Maybe a clearer fix would be to put these away in extra class members to be freed later.