[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is my procedure getting GCed?
From: |
Marius Vollmer |
Subject: |
Re: Is my procedure getting GCed? |
Date: |
01 May 2001 21:46:01 +0200 |
User-agent: |
Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7 |
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.
By using C++ inheritance and virtual functions, you might be able to
hide some of the hair.
Now you would make sure that the GC sees each of your instances, which
might or might not be easier than having it see the SCM data
members...
- Re: Is my procedure getting GCed?, (continued)
- Re: Is my procedure getting GCed?, Michael Livshin, 2001/05/01
- Re: Is my procedure getting GCed?, Brett Viren, 2001/05/01
- Re: Is my procedure getting GCed?, Bill Gribble, 2001/05/01
- Re: Is my procedure getting GCed?, Michael Livshin, 2001/05/01
- Re: Is my procedure getting GCed?, Dirk Herrmann, 2001/05/07
- Re: Is my procedure getting GCed?, Michael Livshin, 2001/05/07
- Re: Is my procedure getting GCed?, Marius Vollmer, 2001/05/14
- Re: Is my procedure getting GCed?, Dirk Herrmann, 2001/05/14
- Re: Is my procedure getting GCed?, Dirk Herrmann, 2001/05/15
- Re: Is my procedure getting GCed?, Brett Viren, 2001/05/01
- Re: Is my procedure getting GCed?,
Marius Vollmer <=
- Re: Is my procedure getting GCed?, Dale P. Smith, 2001/05/01
- Re: Is my procedure getting GCed?, Jed Davis, 2001/05/02