rspack icon indicating copy to clipboard operation
rspack copied to clipboard

add napi value object lifetime management tests

Open hardfist opened this issue 8 months ago • 1 comments

The napi binding implementation is already very complex now and may cause memory leak and segment fault behavior, we need add some tests about it which includes

  • napi value and related resource(compiler & compilation) is collected in time when related js object is gc collected
  • js object can be gc collected rightly( not cycle reference) if not reference from js side
  • access binding value from js api wouldn't cause segmentfault

hardfist avatar Feb 15 '25 15:02 hardfist