# File lib/nice-ffi/typedpointer.rb, line 68
  def wrap( pointer )
    unless pointer.is_a? FFI::Pointer
      raise TypeError, "#{self.class}[ #{@type} ] cannot wrap #{pointer.type}"
    end

    if @type.included_modules.include?( NiceFFI::AutoRelease )
      @type.new( pointer, :autorelease => @autorelease )
    else
      @type.new( pointer )
    end
  end