laz-JSON-Viewer
laz-JSON-Viewer copied to clipboard
memory overflow
There are still more memory leak issues present. Switching from test1.json to test2.json increases memory usage by 0.1MB.
Hey @cn17173,
Thanks for the report!! As soon as I have time, I'll have a go at finding the problem !!
Cheers, Gus
The following two lines of code in the function UpdateTreeFromNode in the unit LJV.Forms.Main may cause memory leaks: treeNode^.NodeName:=TJSONObject(AJSONData).Names[index]; treeNode^.NodePath:= treeNode^.NodePath + '.' + treeNode^.NodeName;. lt seems that assigning dynamically allocated string objects to treeNode·.NodeName without releasing the originalobjects may lead to memory leaks. However,l don't know how to modify it.
SetLength(treeNode^.NodeName, 0); SetLength(treeNode^.NodePath, 0); can solve the memory overflow problem, but it will lose the values of NodeName and NodePath.
Hey @cn17173,
I'm very, VERY grateful for your initial leg work!!! This will, for sure, narrow my attention and will be quicker !!
Again, sorry I don't have time right now to pursue it, but it's on my todo list and it will not be forgiven!!
Cheers, Gus