On Wed 19 Apr 2017 11:50, l...@gnu.org (Ludovic Courtès) writes:
> I need to chew a bit more on this, but the conclusion is probably that
> my expectations were incorrect, indeed. :-)
OK I close this bug in the meantime then :) Feel free to reopen if
there is a thing to do!
Andy
Andy Wingo skribis:
> l...@gnu.org (Ludovic Courtès) writes:
>
>> Consider this code:
>>
>> (use-modules (system foreign))
>>
>> (define %abort
>> (dynamic-func "abort" (dynamic-link)))
>>
>> (let ((ptr (make-pointer 123 %abort)))
>> (display "hello\n")
>> (gc))
>>
>> Guile is free to colle
l...@gnu.org (Ludovic Courtès) writes:
> Consider this code:
>
> (use-modules (system foreign))
>
> (define %abort
> (dynamic-func "abort" (dynamic-link)))
>
> (let ((ptr (make-pointer 123 %abort)))
> (display "hello\n")
> (gc))
>
> Guile is free to collect ‘ptr’ when ‘gc’ is called since it
Hello!
Consider this code:
--8<---cut here---start->8---
(use-modules (system foreign))
(define %table
(make-weak-value-hash-table))
(define %abort
(dynamic-func "abort" (dynamic-link)))
(let ((ptr (make-pointer 123 %abort)))
(display "hello\n")
(gc)