/tags/rel-1-3-25/SWIG/Examples/test-suite/chicken/newobject1_runme_proxy.ss
Scheme | 30 lines | 17 code | 13 blank | 0 comment | 1 complexity | 408c7b983d603183ce80c9b927ad4dd3 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- (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)