From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Brett Viren Newsgroups: gmane.lisp.guile.user Subject: Re: C++ application linked with guile dos not quite Date: Tue, 18 Jun 2002 09:43:36 -0400 Sender: guile-user-admin@gnu.org Message-ID: <15631.14600.194325.589914@minos.phy.bnl.gov> References: <1024320297.17552.141.camel@tice> <1024388708.23129.28.camel@tice> Reply-To: Brett Viren NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1024410234 32137 127.0.0.1 (18 Jun 2002 14:23:54 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 18 Jun 2002 14:23:54 +0000 (UTC) Cc: Guile user Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17KJti-0008M6-00 for ; Tue, 18 Jun 2002 16:23:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17KJID-0005VZ-00; Tue, 18 Jun 2002 09:45:09 -0400 Original-Received: from smtpgw.bnl.gov ([130.199.3.16]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17KJGk-000583-00 for ; Tue, 18 Jun 2002 09:43:38 -0400 Original-Received: from bnl.gov ([130.199.128.163]) by smtpgw.bnl.gov with esmtp (Exim 3.35 #1 ) id 17KJGj-0002NQ-00; Tue, 18 Jun 2002 09:43:37 -0400 Original-Received: from minos (minos.phy.bnl.gov [130.199.36.108]) by bnl.gov (8.9.2/1.0.0-BNL) with ESMTP id JAA03856; Tue, 18 Jun 2002 09:43:36 -0400 (EDT) Original-Received: from bviren by minos with local (Exim 3.34 #1 (Debian)) id 17KJGi-0002fg-00; Tue, 18 Jun 2002 09:43:36 -0400 Original-To: CDDP 40 - TICE In-Reply-To: <1024388708.23129.28.camel@tice> X-Mailer: VM 7.03 under 21.4 (patch 6) "Common Lisp" XEmacs Lucid Errors-To: guile-user-admin@gnu.org X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.user:606 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:606 CDDP 40 - TICE writes: > When guile is embedded in a C++ aplication, is there any garbage > collection to take care of ? Nothing specific about C++, however, if you store a returned SCM value that is not referenced by Guile, you should call scm_protect_object() on it. I do this for example in a strip chart that plots a guile procedure. I need to call scm_protect_object() when the SCM containing the proc. is created and then scm_unprotect_object() when my chart object dies. I happen to store this SCM object in two places in C++, both need "protection". Maybe if you are calling scm_protect_object() but failing to call scm_unprotect_object() then the garbage collector is waiting for the reference count to go to zero? (I'm no expert, so take this with a grain of salt). -Brett. _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user