-
-
Notifications
You must be signed in to change notification settings - Fork 871
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
isAddress function causes memory leak on iOS 18+ #2891
Comments
I am unable to reproduce as the steps to reproduce are too vague. Is this a React Native environment, or a web app in a particular iOS browser? Can you please open a new issue with a minimal reproducible example? |
Hello @memoyil. Please provide a minimal reproduction using StackBlitz, TypeScript Playground (for type issues), or a separate minimal GitHub repository. Minimal reproductions are required as they save us a lot of time reproducing your config/environment and issue, and allow us to help you faster. Once a minimal reproduction is added, a team member will confirm it works, then re-open the issue. |
@jxom I got a mail that you were able to reproduce it but cant find the comment now. Should i create an another ticket with more info ? |
Sorry, yes, I thought I reproduced it, but it turns out the React Native Crypto lib I was using to generate random bytes for the addresses had a memory leak, and not if you could provide a minimal repro, that would be great! |
we have seen that issue, in ios 18+ (web app, nextjs) on this codestub. below 18 all is working fine data contains ~8000+ entries. Any browser (i think because all of them using the same webkit provided by ios) getting unresponsive when this code stub is used, or if it is not, nextjs refreshes the page intermittently to clear the memory (which indicates there is memory leak) When i change this to use own utils function (which is memoized by lodash that uses custom mapcache internally) we didnt see the issue anymore. |
This issue has been locked since it has been closed for more than 14 days. If you found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest Viem version. If you have any questions or comments you can create a new discussion thread. |
Check existing issues
Viem Version
2.21.22
Current Behavior
The isAddress function in the viem library appears to cause a memory leak on devices running iOS 18 or later. When repeatedly calling isAddress in an iOS environment (version 18+), memory consumption steadily increases and is not released, leading to degraded app performance and eventually crashing after prolonged usage.
Expected Behavior
No response
Steps To Reproduce
Steps to Reproduce:
Link to Minimal Reproducible Example
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: