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

Re: [pygame] A question...



> I think you should not solve this in the PySurface_New since the surface you
> want to delete might be owned by another Python object. Am I wrong?

yeah, you are correct. (you won't let me get away with the lazy
solution on this one, eh?). ok, now PySurface_New does not free,
but all functions that call it free when they should.

i've also gone and made this change for the font and sound objects.

not that it really matters, but in the pygame code, the only surface
that could have two separate PyObjects is the display surface, and
SDL has its own special handler for SDL_FreeImage, so i'm pretty sure
it wouldn't have been a problem to keep SDL_FreeSurface inside the
PySurface_New function. still, it's probably best that we do things
the right way, instead of abusing SDL because we can :]




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