Hi, I am using Qt4.5 to write a render program. Since the rendering is time-consuming, I create a thread to do it. Now my program's structure is like this. The generated pixels is store in a vector, and there is a QTimer in the rendering thread, so after a few millionseconds,the rendering thread can pass the newly generated pixels through a Signal. But when I run the programm,there always throw some memory excpetions, e.g Heap corruption.
I think I should do a mutex lock somewhere,but after some experiments, the problem always existing.
I think my design is poor, is there any other design can do this job in Qt?
(Sorry for my poor English.)
Bookmarks