You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
Using version 4.12.1 of web3, creating Contract instances does not cause a memory leak.
It means this behaviour appeared between version 4.12.1 and version 4.16.0
Here are logs for the exact same code with web3 version 4.12.1:
We suggest to migrate to ethers or viem, due Web3.js is sunsetting,
For further details regarding the sunsetting of Web3.js, please refer to the official announcement here: Web3.js Sunset Announcement
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Expected behavior
Creating contract instances should not cause memory leak.
Actual behavior
Creating contract instances is causing a memory leak (heapUsed keeps increasing).
Steps to reproduce the behavior
With this code, HeapUsed keeps increasing (even if newly created contracts are not used and should be deleted by garbage collector automatically).
Logs
On my laptop (Apple M3 Pro), It crashes after 1 minute, It logs this:
Environment
When This behavior has been introduced
Using version
4.12.1
of web3, creating Contract instances does not cause a memory leak.It means this behaviour appeared between version
4.12.1
and version4.16.0
Here are logs for the exact same code with web3 version
4.12.1
:The text was updated successfully, but these errors were encountered: