-
Notifications
You must be signed in to change notification settings - Fork 47
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
Memory leak executing UnsignedTransaction.to_json() #641
Comments
Not sure why you would want to do something like this but its likely caused by the infinite blocking loop, you can achieve a similar effect with no memory leak by doing: setInterval(async () => {
const unsignedTransaction = (await ergolib).UnsignedTransaction.from_json(JSON.stringify(tx));
let txJSON = unsignedTransaction.to_json();
unsignedTransaction.free();
}, 0) |
Thanks for looing at the issue. The initial code that was having memory leaks was for the CYTI miner and it is not used anymore: To find it I've removed iteratively all the code until it stop to memleaks. In other off-chain bots, for Blob's Topia, I'm also facing memory leaks after having taken care of freeing the resources. I will try to extract another minimal test case. |
Ohh I see
Sounds good 👍 |
Trying to sign transactions in a loop, the UnsignedTransaction to_json method does not free the memory used.
Attaching a test case ran with nodejs.
mem-leak.txt
The text was updated successfully, but these errors were encountered: