Bojan, I read this article you gave me the link of, it is very interesting ... and then I checked my code. Quickly I remember that I did
char* buffData = 0;
buffData = new char[bytesToRead];
bytesRead = comPort->readBlock(buffData, bytesToRead);
buffData[bytesRead] = '\0';
comPort->flush();
char* buffData = 0;
buffData = new char[bytesToRead];
bytesRead = comPort->readBlock(buffData, bytesToRead);
buffData[bytesRead] = '\0';
comPort->flush();
To copy to clipboard, switch view to plain text mode
This code is supposed to get a block of memory and add a null character at the end of the buffer ... this version worked well in debug but not in release.
After reading the article I change
buffData = new char[bytesToRead];
buffData = new char[bytesToRead];
To copy to clipboard, switch view to plain text mode
to
buffData = new char[bytesToRead+1];
buffData = new char[bytesToRead+1];
To copy to clipboard, switch view to plain text mode
and it is now working in release version as it is in debug version.
... thnaks for this article, I will take (much more) care of what I am allocating and writing to
Bookmarks