2><a name="ownership">How can I wrap a function which needs to take
    ownership of a raw pointer?</a></h2>

    <blockquote>
      <i>Part of an API that I'm wrapping goes something like this:</i>
<pre>
struct A {}; struct B { void add( A* ); }
where B::add() takes ownership of the pointer passed to it.
</pre>

      <p><i>However:</i></p>
<pre>
a = mod.A()
b = mod.B()
b.add( a )
del a
del b
# python interpreter crashes
# later due to memory corruption.
</pre>

      <p><i>Even binding the lifetime of a</