On 19.08.2013 12:16, Mikael wrote:> In the case of the |struct|, |union| and |type| types, the default
>
> So in your past test with a pointered type, you did see the proper
> behavior. And here comes what applies to the current test:
>
> function reclaims the copy on the C heap referenced by the internalOf course :)
> pointer (when using a C++ compiler this is done using ‘delete
> (type*)internal-pointer’, which calls the destructor of type if it
> is a class) and returns ‘___FIX(___NO_ERR)’.
>
>
> Can you paste your full test code here?
>
;; struct definition
(c-declare "struct test { int a; int b; };")
(c-define-type struct-test (struct "test"))
(define struct-test
(c-lambda () struct-test "___result_voidstar = new test;"))
;; test code
(load "test")
(define (alloc-struct n)
(let loop ((i 0))(let ((a (struct-test)))
(if (< i n)
(loop (+ i 1))
(write "FIN")))))
(alloc-struct 100000000000)
_______________________________________________
Gambit-list mailing list
Gambit-list@iro.umontreal.ca
https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list