Re: Resource freeing
"Stefan Behnel" <[email protected]> Wed, 19 Nov 2008 10:11:42 +0100 (CET)
| Newsgroups | gmane.comp.python.pyrex |
|---|---|
| Message-ID | <48312.145.253.136.18.1227085902.squirrel@groupware.dvs.informatik.tu-darmstadt.de> |
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