[Python-Dev] Functions that steal references (Re: [pygame] [patch] minor memory leaks...) (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Wed Jun 17 01:04:37 CEST 2009
- Previous message: [Python-Dev] SSL Certificate Validation
- Next message: [Python-Dev] Functions that steal references (Re: [pygame] [patch] minor memory leaks...)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Lenard Lindstrom wrote:
I assumed that since PyModuleAddObject is documented as stealing a reference, it always stole a reference. But in reality it only does so conditionally, when it succeeds.
As an aside, is this a general feature of functions that steal references, or is PyModule_AddObject an oddity?
I ask because I've been thinking about adding features to Pyrex for dealing with stolen references, and it could be important to know things like this.
Also, if it's an oddity, it would be a good idea to mention this behaviour in the docs.
-- Greg
- Previous message: [Python-Dev] SSL Certificate Validation
- Next message: [Python-Dev] Functions that steal references (Re: [pygame] [patch] minor memory leaks...)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]