[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: port initialization?
From: |
Han-Wen Nienhuys |
Subject: |
Re: port initialization? |
Date: |
Thu, 8 Aug 2002 21:35:43 +0200 |
address@hidden writes:
>> z = scm_cell (scm_tc16_strport, 0);
>> This looks like fishy code to me. When scm_add_to_port_table triggers
>> GC then it will see the (scm_tc16_strport, 0) cell, which is (or
>> should be) invalid.
>
>Yes, but the GC will not notice since "z" still refers to it and
>therefore the port cell wont be freedo
That's not what I meant: z is a heap cell containing a null
pointer. GC-ing it will dump core.
> > SCM port = scm_cell (scm_tc16_port, newport);
> > newport->port = port;
> > ..
> > }
> /
> This will leak newport when the call to scm_cell throws.
scm_cell throws, what do you mean?
--
Han-Wen Nienhuys | address@hidden | http://www.cs.uu.nl/~hanwen
- port initialization?, Han-Wen, 2002/08/04
- Re: port initialization?, Marius Vollmer, 2002/08/08
- Re: port initialization?,
Han-Wen Nienhuys <=
- Re: port initialization?, Marius Vollmer, 2002/08/08
- Re: port initialization?, Han-Wen Nienhuys, 2002/08/08
- Re: port initialization?, Marius Vollmer, 2002/08/08
- Re: port initialization?, Han-Wen Nienhuys, 2002/08/08
- Re: port initialization?, Marius Vollmer, 2002/08/10
- Re: port initialization?, Han-Wen Nienhuys, 2002/08/16
- Re: port initialization?, Marius Vollmer, 2002/08/16
- Re: port initialization?, Lynn Winebarger, 2002/08/08
- Re: port initialization?, Han-Wen Nienhuys, 2002/08/09
- Re: port initialization?, Marius Vollmer, 2002/08/10