Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

299
Views
Pygame meory leak with pyOpengL

Maybe someone enlighten me. I got this piece of code:

import pygame
from OpenGL.GL import glClear, GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_STENCIL_BUFFER_BIT
from pygame.constants import DOUBLEBUF, OPENGL

pygame.init()
clock = pygame.time.Clock()
pygame.display.set_mode((640,480), DOUBLEBUF|OPENGL)

    
while 1:
    glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT)


    pygame.display.flip()
    clock.tick(50)

Running this causes slow but annoying memory consumption when I check it with process manager. Why is this happening? Not really creating any new object... Just clearing GL buffer and flipping window buffers. I narrowed this down to pygame.display.flip() call but cant do anything about it. Please help.

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!