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:
parent
c92d8c7cf7
commit
308387b7a3
4 changed files with 339 additions and 0 deletions
10
Examples/test-suite/ruby/refcount_runme.rb
Normal file
10
Examples/test-suite/ruby/refcount_runme.rb
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue