[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:
parent
ad93f971ca
commit
9ef207297e
2 changed files with 9 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue