Closed newk5 closed 3 years ago
It'll be appreciated if you could post some snippets for testing and verification
JniLoader.load();
try (JImGui imgui = new JImGui()) {
byte[] b = new byte[100];
imgui.initBeforeMainLoop();
while (!imgui.windowShouldClose()) {
imgui.initNewFrame();
for (int i = 0; i < 50; i++) {
imgui.inputText("", b);
}
imgui.render();
}
}
You can change the code above to inputInt/Float/Double and the same issue will happen.
You can also add imgui.pushID before creating the inputs and imgui.popID after to reproduce the leak with push/pop ID
Tbh, I don't see why they're leaking...
After further tests I can conclude this is happening everywhere where String is used instead of JImStr
Then I'll consider this as a duplicate of #35
Yea I guess this isn't a leak, it's just overhead from java strings being converted.
I found memory leaks using the following functions: