@qvac/sdk 0.13.4 → 0.13.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -151,8 +151,11 @@ export async function close() {
151
151
  logger.info("🧹 Closing RPC client (Expo)");
152
152
  // terminate() crashes on Android (addon dlclose leaves pthread_key_t
153
153
  // destructors dangling); iOS dyld no-ops dlclose so it's safe there.
154
- // Non-iOS: drop refs only -- sending __shutdown__ without a follow-up
155
- // terminate would clear the worker plugin registry.
154
+ // Non-iOS: send the cleanup roundtrip, then drop refs without
155
+ // terminating. Android cannot safely terminate/dlclose the worklet
156
+ // here, but reset/reload still needs addon logger js_ref_t handles
157
+ // released before a fresh worker registers plugins in the same app
158
+ // process.
156
159
  let platform;
157
160
  try {
158
161
  platform = (await getRuntimeContext()).platform;
@@ -161,8 +164,14 @@ export async function close() {
161
164
  logger.debug("Failed to resolve runtime context for close()", { err });
162
165
  }
163
166
  if (platform !== "ios") {
167
+ if (rpcInstance) {
168
+ logger.info("🧹 Requesting worker cleanup");
169
+ await sendShutdownMessage(rpcInstance);
170
+ }
164
171
  rpcInstance = null;
165
172
  rpcPromise = null;
173
+ workletInstance = null;
174
+ workletInitialized = false;
166
175
  return;
167
176
  }
168
177
  // iOS: existing pre-terminate cleanup + terminate.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qvac/sdk",
3
- "version": "0.13.4",
3
+ "version": "0.13.5",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",