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

Re: [pygame] bug (and fix?) in mixer.c



> As I understand it, PyImport_ImportModule(...) returns a new
> reference, PyModule_AddObject(...) *steals a reference* and
> Py_DECREF(...) is freeing up memory that is actually in use!
> 
> Let me know if this is correct as I would like
> to get on with using PyGame for something fun,

hello john, i must admit for "struggling" through learning
everything you managed to do a good job of coming up with
a problem.

i doublechecked the AddObject code, and you are correct,
it does "borrow/steal" the object reference, so there is
no need to DECREF it.

i've got it checked into CVS, so you should just need to
update and see if that fixed it. i've not encountered your
crashing problem, so it will be up to you to see if this
fixes the problem or not.  :-/

actually, i'm hoping many people can try this out, even
if it wasn't crashing for you before, i'd like to know it
is correct for everyone. it all tests out ok for me on NT.


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