unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Implementation of the promise smob
@ 2010-08-20  2:10 Abhijeet More
  2010-08-20  4:43 ` Andy Wingo
  0 siblings, 1 reply; 2+ messages in thread
From: Abhijeet More @ 2010-08-20  2:10 UTC (permalink / raw)
  To: guile-user, Tibi Turbureanu, Andy Wingo

Hi,
I noticed that the implementation of the "promise" smob did not have
any "mark" function defined.
This smob does contain a couple of other SCM objects.

Can someone explain how these objects are not cleared up by the gc
(since nobody marks them as live)?
Thanks
Abhijeet



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Implementation of the promise smob
  2010-08-20  2:10 Implementation of the promise smob Abhijeet More
@ 2010-08-20  4:43 ` Andy Wingo
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Wingo @ 2010-08-20  4:43 UTC (permalink / raw)
  To: Abhijeet More; +Cc: guile-user, Tibi Turbureanu

On Thu 19 Aug 2010 19:10, Abhijeet More <abhijeet.more@gmail.com> writes:

> Hi,
> I noticed that the implementation of the "promise" smob did not have
> any "mark" function defined.
> This smob does contain a couple of other SCM objects.
>
> Can someone explain how these objects are not cleared up by the gc
> (since nobody marks them as live)?

If you do not provide a mark function, the GC will treat all words in an
object as pointers, and mark them.

The problem, I think, is not that the promise refers to its value: it is
that something is mistakenly referring to the promise (and thence to the
value).

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-08-20  4:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-20  2:10 Implementation of the promise smob Abhijeet More
2010-08-20  4:43 ` Andy Wingo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).