microsoft / HoloJS

Provides a framework for creating holographic apps using JavaScript and WebGL.
MIT License
1.19k stars 114 forks source link

Fix crash on image load #99

Closed Almost-Done closed 7 years ago

Almost-Done commented 7 years ago

JsValueRef has auto-cleanup methods when it goes out of scope. When passing these types in std::vector arrays, they get released and upon being accessed on the script side they can cause bogus memory reads or crashes. The fix is to call the callback function from the same context where the parameters are declared.