BUG? PyMem_Free vs strdup
skip at pobox.com
Wed Nov 5 18:51:52 CET 2003
Robin> the storage is allocated and freed thusly
Robin> s = strdup(PyString_AsString(v));
Robin> I don't think I've done something to change the bytes, but can I
Robin> mix strdup allocated memory with the "Python heap" which is what
Robin> the manual talks about or is this a bug?
Memory allocated by strdup() should almost certainly be freed with free(),
Robin> Is there an easy way to get a grasp on the various memory
Robin> allocation functions?
Sure. Keep your allocations and deallocations within the same family of
More information about the Python-list