# File lib/codec/data.rb, line 57 def initialize(capacity = 16) if capacity.is_a?(Integer) @impl = Cproton.pn_data(capacity.to_i) @free = true else # Assume non-integer capacity is a SWIG::pn_data_t* @impl = capacity @free = false end # destructor ObjectSpace.define_finalizer(self, self.class.finalize!(@impl, @free)) end