[Pyrex] How does pyrex manage memory that is malloced, realloced, etc.

Bob Ippolito bob at redivi.com
Sat Jun 25 04:29:48 CEST 2005


On Jun 24, 2005, at 7:14 PM, Nathaniel Haggard wrote:

> An extension that declares a pointer to a struct
>
> cdef class A:
>        struct1 *s
>
> Also contains a method that wraps a C function that allocates memory.
>
> def init_struc1:
>       self.s = c_init()
>
> Is the memory assigned to self.s safe from overwrites?  How does pyrex
> handle the allocated memory?

It doesn't, you do.

-bob




More information about the Pyrex mailing list