private void OnUpdate() { var ctx = _ctx.rawValue; lock (_unrefActions) { while (true) { var count = _unrefActions.Count; if (count == 0) { break; } var act = _unrefActions.Dequeue(); act.action(ctx, act.refid, act.target); // Debug.LogFormat("duktape gc {0}", act.refid); } } if (_byteBufferAllocator != null) { _byteBufferAllocator.Drain(); } }