Python C-API module exit handler - an atexit equivalent?
Asked Answered
S

1

6

I'm using Python ver 2.6.4

There is a function I have to call from a C library when my extension module exits/is unloaded. What would be the equivalent of atexit for a C extension module?

Splint answered 18/1, 2010 at 2:4 Comment(0)
R
6

The Py_AtExit() function can be used to register up to 32 cleanup functions.

Renfred answered 18/1, 2010 at 2:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.