After drawing, i try to adjust the size of the window rapidly until memory (malloc) error comes out. Where go wrong?
There is no drawing instruction in OnSize(). As for OnDraw(), there are wglMakeCurrent( m_hDC, m_hRC), glClear(GL_COLOR_BUFFER_BIT), glLoadIdentity(), glPushMatrix(), glTranslatef(), display some lists, glPopMatrix(), glFinish() and finally SwapBuffers(m_hDC).
i got the error from the debugger saying malloc error. Other than the Onsize() and OnDraw() functions being called, there is no other as far as i know. Within the OnDraw function is a call to another display routine somewhere else. Except opengl instructions and local variable declaration, there is no memory request/calling function (malloc, calloc). Will it be due to hardware or opengl instruction that request memory and is being call repeatly.
Built-in graphics SIS video driver, VC++ 6.0, 256 DDRAM, Win XP. In fact, it only give out error message (in the message box from the debugger) but the program is still able to run until memory runs out/low then it stop.
Just don’t know where should i release the memory.