Closed YiMunDong closed 5 years ago
Hi, thanks for reporting this. Did you also find memory leaks in another application using Im3d (not just the sample)?
Yes, in other projects problems too.
If do nothing between "Im3d::NewFrame()" and "Im3d::EndFrame()", the problem does not occur. but, If insert one or more "Vertex" code, a leak occurs.
ex) Im3d::BeginPoints(); Im3d::Vertex(0, 0, 0, Im3d::Color_Red); Im3d::End();
Thanks again for reporting this. Indeed there was a leak in the Context destructor - some vectors were not properly destroyed. The issue is now fixed.
I modified the code in the sample program (main.cpp).
include "im3d_example.h"
int main(int, char**) {
ifdef _DEBUG
endif
. . . A memory leak message was found in the result window.
Detected memory leaks! Dumping objects -> {4183} normal block at 0x00753568, 167 bytes long. Data: 68 35 75 00 00 00 00 00 00 00 00 00 00 00 00 00
{4182} normal block at 0x0BCB4FA8, 727 bytes long.
Data: < O >; > > A8 4F CB 0B 3E 3B 17 3E 00 00 00 00 00 00 00 00
{4181} normal block at 0x0BC82148, 367 bytes long.
Data: <H! &\= &\= > 48 21 C8 0B 94 26 5C 3D 94 26 5C 3D 00 00 00 00
{1376} normal block at 0x0BCCB108, 1807 bytes long.
Data: < > 08 B1 CC 0B 00 00 20 C1 00 00 00 00 00 00 20 C1
Object dump complete.