Juha Järvi

Results 81 comments of Juha Järvi

Try to compile for debugging (see the [debugging section in the readme](https://github.com/charto/nbind#debugging)) and GDB should help find out which line is crashing. The `-L` flag might work better in `ldflags`,...

`std::unique_ptr` helps here. Fully working example adapted from #52: ```C++ #include "nbind/api.h" /* If using C++11 instead of C++14, uncomment this: namespace std { template std::unique_ptr make_unique(Args&&... args) { return...

@parro-it That was hopefully fixed in this commit: https://github.com/charto/nbind/commit/07aa65c0d61ef27cd17b48cccf6607e6630419c8 You can call the `cbFunction`'s (it's a `cbWrapper`) `reset` method to release the pointer from C++ side.

Your testcase should work, so there's a bug. It seems there's some problem with passing objects by value to C++, when they were initally allocated as pointers.

I'll try to fix the first bug since it's more deterministic, and may be the underlying issue for your current tests failing later.

Passing an object without a `toJS` method by value was simply totally unimplemented. It reserved a slot for temporarily holding the JavaScript object in an array (for calling its `toJS`...

Awesome! It was pretty easy to get the tests running (just had to install `segfault-handler` and change `-O3` in `nbind.gypi`). For me, asm.js version of `BufferOffsetIndex` initially fails due to...

I get the same result. Using `ALLOW_MEMORY_GROWTH` is not recommended anyway, because it de-optimizes the entire asm.js module on compliant browsers. The bug may indeed be in Emscripten. I have...

For performance reasons, the Emscripten target skips many checks done on the V8 target. In asm.js code the tests would often require a wrapper causing an additional function call and...

Looks like it might have to do with converting vectors or passing them by value instead of by reference in the nbind version. I'll check this further...