Re: GC question

2005-08-18 Thread Erik Sandberg
On Thursday 18 August 2005 11.25, Han-Wen Nienhuys wrote: > Erik Sandberg wrote: > > class A { > > SCM b_; > > A() { b_ = get_b (); scm_gc_protect_object (b_); } > > ~A() { scm_gc_unprotect_object (b_); } > > ... > > }; > > > > Now if a third smob C contains an A object, as in > > > > class

Re: GC question

2005-08-18 Thread Han-Wen Nienhuys
Erik Sandberg wrote: class A { SCM b_; A() { b_ = get_b (); scm_gc_protect_object (b_); } ~A() { scm_gc_unprotect_object (b_); } ... }; Now if a third smob C contains an A object, as in class C { A a_; ... DECLARE_SMOBS (C); }; .. then A's gc_unprotect will be called during the g

Re: GC question

2005-08-18 Thread Erik Sandberg
On Wednesday 17 August 2005 16.08, Han-Wen Nienhuys wrote: > Erik Sandberg wrote: > > Hi, > > > > Does anyone know if it is safe to call scm_gc_unprotect_object inside the > > destructor of a smob? I know it sounds a bit weird to do so, but it's the > > cleanest solution I can find to a problem. >

Re: GC question

2005-08-17 Thread Han-Wen Nienhuys
Erik Sandberg wrote: Hi, Does anyone know if it is safe to call scm_gc_unprotect_object inside the destructor of a smob? I know it sounds a bit weird to do so, but it's the cleanest solution I can find to a problem. it will generate an error in GUILE 1.7 CVS. This should never be necessary

GC question

2005-08-17 Thread Erik Sandberg
Hi, Does anyone know if it is safe to call scm_gc_unprotect_object inside the destructor of a smob? I know it sounds a bit weird to do so, but it's the cleanest solution I can find to a problem. Erik ___ lilypond-devel mailing list lilypond-devel@gn

Re: GC question

2004-05-23 Thread Michael Welsh Duggan
Han-Wen Nienhuys <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] writes: >> How are grobs created by make_item from within perfomers protected >> from GC? I couldn't find any container object which calls their >> mark_smob function. (I'm rather tired right now, so I suspect I am >> overlooking

Re: GC question

2004-05-23 Thread Michael Welsh Duggan
Han-Wen Nienhuys <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] writes: >> Han-Wen Nienhuys <[EMAIL PROTECTED]> writes: >> >> > [EMAIL PROTECTED] writes: >> >> How are grobs created by make_item from within perfomers protected >> >> from GC? I couldn't find any container object which calls th

Re: GC question

2004-05-23 Thread Han-Wen Nienhuys
[EMAIL PROTECTED] writes: > Han-Wen Nienhuys <[EMAIL PROTECTED]> writes: > > > [EMAIL PROTECTED] writes: > >> How are grobs created by make_item from within perfomers protected > >> from GC? I couldn't find any container object which calls their > >> mark_smob function. (I'm rather tired right

GC question

2004-05-23 Thread Han-Wen Nienhuys
[EMAIL PROTECTED] writes: > How are grobs created by make_item from within perfomers protected > from GC? I couldn't find any container object which calls their > mark_smob function. (I'm rather tired right now, so I suspect I am > overlooking something very simple.) Have a look at the smobify_s

GC question

2004-05-23 Thread Michael Welsh Duggan
How are grobs created by make_item from within perfomers protected from GC? I couldn't find any container object which calls their mark_smob function. (I'm rather tired right now, so I suspect I am overlooking something very simple.) -- Michael Welsh Duggan ([EMAIL PROTECTED]) ___