Re: [Chicken-users] GC root gets garbage collected

2015-03-20 Thread Christopher Collins
On Thu, Mar 19, 2015 at 12:21 PM, Christopher Collins ccollins47...@gmail.com wrote: Hello Chicken users, I'm struggling with an issue where a scheme object is being unexpectedly garbage collected. Just to provide an update - the problem appears to be solved. My mistake was that I was

Re: [Chicken-users] GC root gets garbage collected

2015-03-19 Thread Peter Bex
On Thu, Mar 19, 2015 at 12:21:47PM -0700, Christopher Collins wrote: The way I understood it, the returned mystruct instance would never get garbage collected until I explicitly call CHICKEN_delete_gc_root(). I never actually delete the root (I set a breakpoint on CHICKEN_delete_gc_root in

Re: [Chicken-users] GC root gets garbage collected

2015-03-19 Thread Christopher Collins
Thanks, Peter. The C code always uses CHICKEN_gc_root_ref() to obtain the reference that it passes to the scheme code. Also, something that I didn't make very clear: after creating the root as paraphrased in my previous email, the C code successfully passes the struct reference to a scheme

[Chicken-users] GC root gets garbage collected

2015-03-19 Thread Christopher Collins
Hello Chicken users, I'm struggling with an issue where a scheme object is being unexpectedly garbage collected. To provide some context: my program's main() is in C, and the C code calls out to scheme procedures. One of these scheme procedures makes and returns a struct (via the defstruct