-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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: Json::Value cannot be release #1548
Comments
Use |
I tried this code. However, the code shows a memory leak when you are not handling the signal. If you handle the SIGINT signal try to break the loop using CTRL + C. There is no memory leak. Here is my code. please try this.
|
you may try to check to replace
Is compilation optimization enabled? |
@OnlySoaring I also encountered this problem。 |
Describe the bug
When I use Json:: Reader or Json:: parseFromStream to create Json:: Value, the memory of Json:: Value is not released when the function ends
To Reproduce
Expected behavior
My JSON file has 681MB. When the test program printed 1, the program occupied 2.12GB of memory. At the end of "while", Json:: value should be released, but when the test program prints 2, the memory does not decrease. Whether I use Json:: Reader or Json:: parseFromStream, it's the same. This is fatal for multi program projects as it occupies useless memory.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: