This is the mail archive of the guile@cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

garbage collection and C


I create a smob in guile:

(define foo (make-smob "the smob"))

So if I then have a function that grabs a smob and points to it with
some internal structure in C:

(add-to-internal-structure foo)

Now somewhere I have a pointer to the smob in C that guile (I think)
doesn't know about. So now foo gets removed and there are no other
references to that smob except a pointer in C. Then when garbage
collection rears its head, that smob and the associated data would get
freed, correct? and the pointer inside C would be a dangling pointer
then, right?

So how can I tell guile that I have a pointer the smob that it doesn't
know about and it shouldn't garbage collect it until I tell it it can?

Or something of that nature...

If you could point me at some garbage collection docs I'd be overjoyed!

-- 
"They call me...The Searcher!"

          -- The Searcher

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]