From 3b74aab8186d64f75d4a6f76d5fa38145e4005ee Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Thu, 11 Sep 2003 11:07:05 +0000 Subject: [PATCH] add pyfinalize safety [SVN r20022] --- todo.html | 17 ++++++++++++++++- todo.txt | 17 ++++++++++++++++- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/todo.html b/todo.html index 5ada8b25..e7014f8e 100755 --- a/todo.html +++ b/todo.html @@ -50,6 +50,7 @@
  • Langbinding
  • Refactoring and Reorganization
  • NumArray Support Enhancements
  • +
  • PyFinalize Safety
  • @@ -174,12 +175,26 @@ languages, initially Lua. See discussions at Consider integrating the enhancements described in http://aspn.activestate.com/ASPN/Mail/Message/C++-sig/1757092 +
    +

    PyFinalize Safety

    +
    +

    Currently Boost.Python has several global (or function-static) +objects whose existence keeps reference counts from dropping to +zero until the Boost.Python shared object is unloaded. This can +cause a crash because when the reference counts do go to zero, +there's no interpreter. In order to make it safe to call +PyFinalize() we must register an atexit routine which +destroys these objects and releases all Python reference counts +so that Python can clean them up while there's still an +interpreter. Dirk Gerrits has promised to do this job.

    +
    +
    diff --git a/todo.txt b/todo.txt index 8b7456e7..c4d39192 100644 --- a/todo.txt +++ b/todo.txt @@ -71,7 +71,6 @@ Injected Constructors - Type Converters =============== @@ -152,3 +151,19 @@ NumArray Support Enhancements Consider integrating the enhancements described in http://aspn.activestate.com/ASPN/Mail/Message/C++-sig/1757092 + +``PyFinalize`` Safety +--------------------- + + Currently Boost.Python has several global (or function-static) + objects whose existence keeps reference counts from dropping to + zero until the Boost.Python shared object is unloaded. This can + cause a crash because when the reference counts *do* go to zero, + there's no interpreter. In order to make it safe to call + ``PyFinalize()`` we must register an ``atexit`` routine which + destroys these objects and releases all Python reference counts + so that Python can clean them up while there's still an + interpreter. `Dirk Gerrits`_ has promised to do this job. + + .. _`Dirk Gerrits`: mailto:dirk-at-gerrits.homeip.net +