All pastes #1848986 Raw Edit

Anonymous

public text v1 · immutable
#1848986 ·published 2010-03-22 05:56 UTC
rendered paste body
--- /usr/src/bindings/ruby/lib/rdf/redland/stream.rb	2010-02-04 11:32:48.023042111 +0000
+++ stream.rb	2010-03-18 05:21:36.675868978 +0000
@@ -11,19 +11,10 @@
     include Util
     attr_accessor :stream
 
-    # Create a wrapper for a librdf_stream object (?? confirm)
     def initialize(object,model)
       @stream = object
       @model = model
-      ObjectSpace.define_finalizer(self,Stream.create_finalizer(@stream))
-    end
 
-    # You shouldn't use this. Used internally for cleanup.
-    def Stream.create_finalizer(stream)
-      proc {|id| "Finalizer on #{id}"
-        #puts "closing stream"
-        Redland::librdf_free_stream(stream)
-      }
     end
 
     # Test if the stream has ended
@@ -107,15 +98,6 @@
         my_node=Redland.librdf_iterator_next(@iterator)
       end
 
-      ObjectSpace.define_finalizer(self,NodeIterator.create_finalizer(@iterator))
-    end
-
-    # You shouldn't use this. Used internally for cleanup.
-    def NodeIterator.create_finalizer(iterator)
-      proc {|id| "Finalizer on #{id}"
-        #puts "closing iterator"
-        Redland::librdf_free_iterator(iterator)
-      }
     end
 
   end