02-11-2009 04:20 AM
Hi !
Thanks to everyone who spend some time on my problem
I don't understand why, but the imaqDispose function create memory leaks.
For exemple, when I try :
StraightEdgeReport2* straightEdgeReport = NULL;
.....
while( i<6000 )
{
straightEdgeReport = imaqStraightEdge(image, roi, IMAQ_SEARCH_DIRECTION_LEFT_TO_RIGHT, edgeOptions, straightEdgeOptions);
imaqDispose(straightEdgeReport);
i++;
}
......
After a while, I've got an error message that said I haven't enough memory to create a straigthEdgeReport. I tried to use the free() fonction, but I got the same error.
I work with LabWindows 8.5.0.
Thanks, A+.
02-13-2009 07:04 AM
Hi Sadalsud17,
This was reported to R&D (#128911) for further investigation. Thanks for the feedback!
Best regards
Yann C.
France
03-25-2009 10:10 AM
Thanks...
I reopened this topic because of some changes.
Untill the bug is fixed, I simply avoid to use imaqStraightEdges in loops. I have some memory leak (4Ko each time) but it still working.
However I recently installed the update Vision 8.6.4 (I did it because I had memory leaks with imaqLearnPattern3).
Now, each time I call imaqStraightEdges I have almost 100 Mo of memory leak, so my programm crash eventually.
I need both imaqStraightEdges and imaqLearnPattern in my project...Does anyone know how I can fix this problem or when R&D will release a version without memory leak ?
Thanks again for any help,
Best Regards.
05-25-2010 01:35 AM
Dear ALL:
I also meet this question when using imaqStraightEdge,
StraightEdgeReport2* edgereport=NULL;
edgereport=imaqStraightEdge(searchImage,roi1,IMAQ_SEARCH_DIRECTION_RIGHT_TO_LEFT,&edgeOptions,&straightEdgeOptions);
startX=edgereport->straightEdges->straightEdgeCoordinates.start.x;
startY=edgereport->straightEdges->straightEdgeCoordinates.start.y;
endX=edgereport->straightEdges->straightEdgeCoordinates.end.x;
endY=edgereport->straightEdges->straightEdgeCoordinates.end.y;
the red color code may cause the Access error!
Thanks for any help......