guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is my procedure getting GCed?


From: Dale P. Smith
Subject: Re: Is my procedure getting GCed?
Date: Tue, 01 May 2001 23:15:53 -0400

Marius Vollmer wrote:
> 
> Brett Viren <address@hidden> writes:
> 
> > To avoid all this by-hand protecting/unprotecting I instead could
> > handle this by accessing all SCM values via a lightweight C++
> > Handler class and deal with protect/unprotect by overriding
> > operator=().
> 
> Another option is to `promote' all your C++ objects to Scheme objects
> and have them managed by the GC.  You would do this with `smobs'.  For
> each of your classes, you would have to write a `marking' routine that
> call `scm_gc_mark' on all SCM objects contained in an instance of this
> class.  The instance itself will be wrapped in a smob and passed
> around as a SCM, too.  This might be more efficient than using
> protect/unprotect as well.

I'd love to see an example of this.  Maybe something for the (quite
excellent) manual?

-Dale
-- 
Dale P. Smith
Treasurer, Cleveland Linux Users Group http://cleveland.lug.net
Senior Systems Consultant, Altus Technologies Corporation
address@hidden
440-746-9000 x309



reply via email to

[Prev in Thread] Current Thread [Next in Thread]