How properly manage memory of this PyObject* array?? (C extension)

seberino at spawar.navy.mil seberino at spawar.navy.mil
Mon Jul 10 14:39:03 EDT 2006


> > Q2: Must I do free(my_array); at end of function??
> unless some other part of your program holds on to it

F.

Thanks!  If I understand you correctly then I never have
to do free(my_array); because all the elements
of my_array are still being used and appended to other
structures elsewhere right?

As long as each element of my_array is managed
properly and freed properly there is  NEVER any
reason to worry about fact that free(my_array)
will never get run right?


cs




More information about the Python-list mailing list