added refcount example using the old macro way and the proposed ref/unref features

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5667 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-01-22 06:26:17 +00:00
commit 55e0ea52bd
4 changed files with 339 additions and 0 deletions

View file

@ -0,0 +1,15 @@
from refcount import *
#
# very innocent example
#
a = A3()
b1 = B(a)
b2 = B.create(a)
if a.ref_count() != 3:
print "This program will crash... now"