You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please bare with me, I do almost never program in python, so maybe I did something completely stupid trying to solve this. But at least it works for me (preview.py running for 2 hours, no memory leaking).
Hi! I'm having a memory leak when liveview is running, is there any way to avoid this?
Regards
code:
def liveview():
global main_surface
C = piggyphoto.camera()
C.leave_locked()
C.capture_preview('./Ims/preview.jpg')
picture = pygame.image.load("./Ims/preview.jpg")
pygame.display.set_mode(picture.get_size())
main_surface = pygame.display.get_surface()
pygame.display.set_caption("Vista en Vivo")
while not quit_pressed():
C.capture_preview('./Ims/preview.jpg')
show("./Ims/preview.jpg")
pygame.display.quit()
C.exit()
os.remove("./Ims/preview.jpg")
The text was updated successfully, but these errors were encountered: