[Python] Add %newobject reference to python memory management subsection of manual

(patch from mdbeachy in SF#1894610).


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10339 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Olly Betts 2008-04-03 11:59:26 +00:00
commit 9ef207297e
2 changed files with 9 additions and 0 deletions

View file

@ -2391,6 +2391,11 @@ that is contained inside another object, you definitely don't want
Python to assume ownership and destroy it!
</p>
<p>
A good way to indicate that ownership should be set for a returned pointer
is to use the <a href="Library.html#Library_nn11">%newobject directive</a>.
</p>
<p>
Related to containers, ownership issues can arise whenever an object is assigned to a member
or global variable. For example, consider this interface: