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

Memory node exception created #1314

Open
mrcao20 opened this issue Aug 23, 2024 · 1 comment
Open

Memory node exception created #1314

mrcao20 opened this issue Aug 23, 2024 · 1 comment

Comments

@mrcao20
Copy link

mrcao20 commented Aug 23, 2024

Recently I found a problem when I use your code, but I'm not sure whether it's a bug or just the design, so I submit this issue.
I have a long-term task. A YAML::Node is constructed at the beginning of the task. This Node will not be destructed during the task. During the task, the progress will be recorded at regular intervals (that is, the Node will have the same key but value different assignments) and synchronize it to the file. At the end of the task, I found that the YAML::Node constructed at the beginning was destructed very slowly.
Through debugging and looking through the source code, I found that even if the same key is assigned, the internal memory object will continue to create and merge new nodes. This led me to find that nearly 100,000 nodes were created internally at the end of the task. The m_pNode object of YAML::Node is normal, but the number of child nodes in the m_pMemory object is abnormal. I am not sure whether it is designed like this or something. Looking forward for ur reply. Have a nice day.

@hkarel
Copy link
Contributor

hkarel commented Feb 1, 2025

Hi, maybe there is a solution to your problem here: #944

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

2 participants