------ art_18376_19568078.1202370242981 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Feb 4, 2008 10:24 PM, Jan Dvorak <jan.dvorak / kraxnet.cz> wrote: > On Monday 04 February 2008 20:16:22 Jason Roelofs wrote: > > As you cannot explicitly unload a require, no there's nothing like > > this because it's not needed. When the ruby interpreter shuts down, > > the C runtime / OS cleans up anything opened during execution. > > And if you have any resources you need to clean up at ruby exit, you can > do so > by setting rb_set_end_proc() to your cleanup func. > > Jan > > Thank you Jan, that was _exactly_ what I was looking for. And Jason, that is not at all true. When the Ruby interpreter tears down it does call the "free" function for all objects created from the extension that has an "allocate" function. I have _global_ resources that are allocated and needs to be released because of reference counting, and which is not done automatically by windows. I understand that if the Ruby process _dies_ nothing can save me, but that is not the common case (and in my case unfortunately requires a service-restart). Thanks! Happy-time ;D /D ------ art_18376_19568078.1202370242981--