code: function allocReference(classWrap) {
    // We do some "magic" here to support the dereferenced
    // pointer to become an obj-c type.
    var ptr = ref.alloc('pointer', null);
    ptr._type = '@';
    var _ref = ptr.ref;
    ptr.ref = function() {
      var v = _ref.call(ptr,arguments);
      var _deref = v.deref;
      v.deref = function() {
        var rtnval = _deref.call(v,arguments)
        return core.wrapValue(rtnval,'@');
      };
      return v;
    };
    return ptr;
  }
docs: Allocates a new pointer to this type. The pointer points to `nil` initially.
  This is meant for creating a pointer to hold an NSError*, and pass a ref()
  to it into a method that accepts an 'error' double pointer.
  XXX: Tentative API - name will probably change