[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[pygame] garbage collector?



Hello,

There's something I've been wondering for a while, and my efforts to
find out on my own have been completely unsuccessful, so I figured I'd
ask some people who might know. I hope no one minds me asking a question
not directly related to using Pygame.

I tried looking at the Pygame C source code to figure this out;
unfortunately ever since I started using Python C gives me a headache
and I was unable to continue. Basically I am wondering... does Python's
garbage collector take care of stuff allocated from C also? For
instance, I'm assuming that when you create a Pygame Surface, Pygame
creates an SDL_Surface. Now if Python garbage collects that Pygame
Surface, does it automatically free that SDL_Surface also or does Pygame
have to take care of that somehow? If Pygame does it, what is involved
in doing that?

Thank you

Mike Benfield

____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org