def clean
      if @dirty
        @store = FFI::MemoryPointer.new @element_size, @items.size, true

        # copy over
        offset = 0
        @items.each do |item|
          LibC.memcpy(@store + offset, item.pointer, @element_size)
          offset += @element_size
        end

        @dirty = false
      end
    end
def clean
      if @dirty
        @store = FFI::MemoryPointer.new @element_size, @items.size, true

        # copy over
        offset = 0
        @items.each do |item|
          LibC.memcpy(@store + offset, item.pointer, @element_size)
          offset += @element_size
        end

        @dirty = false
      end
    end
Allocate a contiguous chunk of memory and copy over the PollItem structs
 to this block. Note that the old +@store+ value goes out of scope so when
 it is garbage collected that native memory should be automatically freed.