JSContextGroup class
JSContextGroupRef A group that associates JavaScript contexts with one another. Contexts in the same group may share and exchange JavaScript objects.
- Implemented types
- Mixed-in types
-
- AutoDisposeFinalizer
Constructors
- JSContextGroup.new(JSContextGroupRef _ref, {bool autoDispose = true})
- JSContextGroup.create()
-
Creates a JavaScript context group.
A JSContextGroup associates JavaScript contexts with one another.
Contexts in the same group may share and exchange JavaScript objects. Sharing and/or exchanging
JavaScript objects between contexts in different groups will produce undefined behavior.
When objects from the same context group are used in multiple threads, explicit
synchronization is required.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- nativeFinalizer ↔ NativeFinalizer?
-
dart 对象回收器
getter/setter pairinherited
- ref → JSContextGroupRef
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
attach(
Pointer< NativeFinalizerFunction> callback, Pointer<Void> token, {bool autoDispose = true, Object? detach, int? externalSize}) → dynamic -
将引擎持有的指针和 dart 对象回收器绑定。确保 dart 对象销毁的时候,释放引擎持有的指针和资源
inherited
-
detach(
) → dynamic -
将引擎持有的指针和资源释放
inherited
-
free(
) → void - Releases a JavaScript context group.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
retain(
) → JSContextGroup -
Retains a JavaScript context group.
@result
(JSContextGroupRef) A JSContextGroup that is the same as group. -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override