Thanks for your reply ChrisW67.
The code above it's only an example. In my application I have to allocate/deallocate a QGLWidget several times. I know that the OS doesn't freed immediatly the memory, but in my application I noticed that the memory isn't deallocated also after many minutes. I need to reistantiate a QGLWidget when the user clicks on a particular button, this can happen 2-3 times per minute, so the OS would have all the time to freed the memory, but this doesn't happen; for each click the memory increases and after 1 hour of application usage the memory reaches 1 GB. I think to manage correctly the method where I implented the QGLWidget reinitialization, in fact, I performed an object DELETE before and a NEW after. What do I have to do in order to solve this issue??? Thanks.
Bookmarks