Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

多次绘制后,模拟器就内存溢出了 #84

Open
CrossLee opened this issue May 30, 2024 · 0 comments
Open

多次绘制后,模拟器就内存溢出了 #84

CrossLee opened this issue May 30, 2024 · 0 comments

Comments

@CrossLee
Copy link

Description

image

这里是动态生成二维码的,输入的数字一变化就会重新绘制。

Environment

  • Platform: [开发者工具/iOS/Andriod/Web]
  • Platform version: [对应工具或者iOS或者Andriod的版本号]
  • Wechat version: [微信版本号]
  • weapp-qrcode version: [在package.json里]
  • other version: [如果在某一设备下出现该问题,请填写设备号]

Reproduce

问题复现步骤:

多次调用这段代码就会内存溢出

drawQrcode({
            width: 200,
            height: 200,
            canvasId: id,
            // ctx: wx.createCanvasContext('myQrcode'),
            text: `${domain}/single/page/cpickpoint?merchantId=${merchantId}&point=${point}&ms=${ms}&price=${price}`,
            // v1.0.0+版本支持在二维码上绘制图片
            // image: {
            //   imageResource: '../../images/icon.png',
            //   dx: 70,
            //   dy: 70,
            //   dWidth: 60,
            //   dHeight: 60
            // },
            callback: function () {
                wx.hideLoading();
            }
        })

期望的表现:

[在这里描述期望的表现]

观察到的表现:

[在这里描述观察到的表现]

屏幕截图和动态 GIF 图

![复现步骤的屏幕截图和动态 GIF 图](图片的 url)

Relevant Code / Logs

// TODO(you): code or logs here to reproduce the problem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant