fix memory PyObject * typemaps to avoid memory leaks with iterators

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8375 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2006-01-11 23:05:12 +00:00
commit 5daf66c0db
4 changed files with 30 additions and 4 deletions

View file

@ -1,7 +1,13 @@
import sys
from langobj import *
x ="hello"
if identity(x) != x:
rx = sys.getrefcount(x)
v = identity(x)
rv = sys.getrefcount(v)
if v != x:
raise RuntimeError
if rv - rx != 1:
raise RuntimeError