rdkit/rdkit-js

RuntimeError: Aborted(OOM). Build with -sASSERTIONS for more info.

ashipiling opened this issue · 2 comments

When I draw more than 200 molecules in one page, the page reports OOM error.

Method: load the javascript file and instantiate the wasm module inside the head tag of index.html

Version: 2022.09.1

Browser: Edge

image

This is not a bug. You most likely ran OOM because every time you instantiate a molecule, you need to explicitly delete it calling its delete() method, otherwise you'll be leaking memory.

mol = rdkitModule.get_mol('CCC');
// do something with your mol
// when done, delete it
mol.delete();

thanks!