解决开发遇到百度地图组件内存溢出问题
原报错:Uncaught RangeError: WebAssembly.Memory(): could not allocate memory 解决办法：添加 mapInstanceRef.current 检查 const clearCurrentOverlays = () => { if (!mapInstanceRef.current) return; currentOverlayRef.current.forEach(overlay => { mapInstanceRef.current.removeOverlay(overlay); }); currentOverlayRef.current = [];};