mmomtchev / swig

This is SWIG JavaScript Evolution, a fork of the SWIG project with modern JavaScript/TypeScript support including WASM and async
http://www.swig.org
Other
7 stars 0 forks source link

Asynchronous handlers do not execute `freearg` tmap when throwing while processing the arguments #28

Closed mmomtchev closed 4 months ago

mmomtchev commented 4 months ago

The following will leak memory:

C++

void fn(const std::string &s);

JS:

try {
  await fn(10);
} catch(e) {
  console.error(e);
}