From: Fernando P. <fpe...@gm...> - 2006-08-18 23:53:02
|
> This leak is caused by add_docstring, but it's supposed to leak. I wonder if > there's a way to register some kind of on-exit handler in Python so that > this can also be cleaned up? import atexit atexit.register(your_cleanup_function) whose api is no args on input: def your_cleanup_function(): do_whatever... You could use here a little extension function which goes in and does the necessary free() calls on a pre-stored list of allocated pointers, if there's more than one (I don't really know what's going on here). Cheers, f |