Sayan751 / email-address-parser

An RFC 5322, and RFC 6532 compliant email address parser.
MIT License
19 stars 4 forks source link

Memory management #9

Open robertf224 opened 2 years ago

robertf224 commented 2 years ago

Hi! I like the design of this library, was going to look into using in a project but noticed the .free() method on the EmailAddress class. Not too familiar with the latest on wasm stuff but appears as though I might need to manually do memory management here and explicitly free an EmailAddress after I'm done with it?

Sayan751 commented 2 years ago

Hi @robertf224! Thank you for your question. I am currently using wasm-pack to create the wasm modules. That currently does not support the --weak-refs flag; refer to this issue.

In the absence of that, it is better to call the .free() method to deallocate the memory.