From: thomass@... (Thomas) Date: 2003-09-01T05:46:15+09:00 Subject: Holding a reference to a ruby object outside the interpreter How can I hold a reference to a ruby object outside the interpreter? Ie, how can I prevent it from being garbage collected if my (external) reference is the only one. In .net I can use a System.Runtime.InteropServices.GCHandle if I want to hold a reference to a managed object in unmanaged code. Calling GCHandle.Alloc(object anObject) pins the objects address so the GC will never move it and prevents the object from being gc'ed before the handle is release by calling its Free() method. What is the equivalent technique in ruby? /Thomas