From: Tobias Peters Date: 2003-04-18T12:12:29+09:00 Subject: Re: tutorial on embedding ruby (review) Steve Hart wrote: > Thanks v much for reply. However, Mauricio (prev reply) says v > definitly gets GC'd whilst you say it may not - which is correct?. Steve -- despite the hurry you are in, please discover that Mauricio and me did actually agree with each other. We agreed that in both versions that you presented, the new ruby object would be GC'ed. For me, and concerning your second example, this was a new discovery. But I admit you have a point there, and your concerns were justified. However, we both also posted a workaround for your second example, involving a helper function. It happened to be the exact same workaround in my and Mauricio's posting. (We even gave the same name to the helper function ("do_stuff") in both cases.) With this workaround, your object will not be deleted by the gc. Tobias P.S: As for your new example code and explanation, I have no idea what you mean by (several?) ruby scripts that may share ObjNodes. What is, by your definition, a ruby script? I would think script is a synonym for program, but obviously this does not apply here, since you want to share objects between them, while two programs would run in distinct processes and thus distinct address spaces.