git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7155 626c5289-ae23-0410-ae9c-e8d60b6d4f22
30 lines
383 B
Scheme
30 lines
383 B
Scheme
(require 'newobject1)
|
|
|
|
(define-macro (check-count val)
|
|
`(if (not (= (Foo-fooCount) ,val)) (error "Error checking val " ,val " != " ,(Foo-fooCount))))
|
|
|
|
(define f (Foo-makeFoo))
|
|
|
|
(check-count 1)
|
|
|
|
(define f2 (makeMore f))
|
|
|
|
(check-count 2)
|
|
|
|
(set! f #f)
|
|
(gc #t)
|
|
|
|
(check-count 1)
|
|
|
|
(define f3 (makeMore f2))
|
|
|
|
(check-count 2)
|
|
|
|
(set! f3 #f)
|
|
(set! f2 #f)
|
|
|
|
(gc #t)
|
|
|
|
(check-count 0)
|
|
|
|
(exit 0)
|