[Pyrex] Resource freeing

Stefan Behnel stefan_ml at behnel.de
Wed Nov 19 10:11:42 CET 2008


Anders Waldenborg wrote:
> How am I supposed to handle freeing of resources allocated from inside
> of python?
>
>      t = malloc(10);
>      ret = x + 1
>      free(t)

Use try-finally.

Stefan




More information about the Pyrex mailing list