recast-navigation-js
recast-navigation-js copied to clipboard
Improve memory cleanup functionality and document
Right now manual memory management with this lib is not straightforward, and not everything required is correctly exposed. Also, nothing is documented in the READMEs
This needs fixing!
todo:
- add
destroy()
methods where appropriate - expose emscripten
_free
anddestroy
in @recast-navigation/core for more advanced use cases - add memory management information to READMEs
Progressed by: https://github.com/isaac-mason/recast-navigation-js/commit/273c456051a6a4ad7f0deb13d7c391842c552d47
Still requires documenting
Right now recast-navigation has some functionality for attempting to automatically free memory when c++ objects aren't correctly destroyed via FinalizationRegistry.
I'm not 100% convinced the feature is a good idea, and the current implementation isn't great. It should be removed at least for now.
https://github.com/isaac-mason/recast-navigation-js/commit/257e98842487b586428f3f0af5d97ac0cd17040c