bnoazx005 / TDEngine2

TDEngine2 is a cross-platform game engine
Apache License 2.0
18 stars 4 forks source link

[Bug] A memory leak appears each frame #32

Closed bnoazx005 closed 5 years ago

bnoazx005 commented 5 years ago

Bug report

A memory leak appears in runtime when nothing actually happens at all.

Environment

Win 10 x64 (Visual Studio 2017)

Steps to reproduce the issue

1) Run any program which is powered by TDEngine2

What's the expected result?

The engine preallocates memory block of specified size, but any extra allocations should not happen.

What's the actual result?

About 1 megabyte of additional allocations are made every second.

Additional info

The possible source of the problem could be std::string member of TDrawCommand type.

bnoazx005 commented 5 years ago

Partially fixed in a7040e273bc25a5a6b844cceffbb2b30997de186 for OpenGL graphics context.

bnoazx005 commented 5 years ago

Fixed in e093502fc11a8eeb6206365fdcf516737f1fde90