JSValue.ptr constructor

JSValue.ptr(
  1. JSContext _ctx,
  2. JSValue_ v, {
  3. bool autoDispose = true,
})

Implementation

JSValue.ptr(this._ctx, JSValue_ v, {bool autoDispose = true})
    : _ref = calloc.call<JSValue_>(sizeOf<JSValue_>())..ref = v,
      _isAlloced = true {
  attach(Q_JS_FreeValueAddress.cast(), _ref.cast(), autoDispose: autoDispose);
}