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/SWIG@5667 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-01-22 06:26:17 +00:00
commit 308387b7a3
4 changed files with 339 additions and 0 deletions

View file

@ -0,0 +1,10 @@
require 'refcount'
a = Refcount::A3.new;
b1 = Refcount::B.new a;
b2 = Refcount::B.new a;
if a.ref_count() != 3
print "This program will crash... now\n"
end