You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Detected memory leaks!
Dumping objects ->
{222} normal block at 0x00000232E02AB650, 48 bytes long.
Data: < > C8 12 9A BE FE 7F 00 00 00 00 00 00 00 00 00 00
{220} normal block at 0x00000232E02AD2C0, 48 bytes long.
Data: < > C8 12 9A BE FE 7F 00 00 00 00 00 00 00 00 00 00
{218} normal block at 0x00000232E02AD250, 48 bytes long.
Data: < > C8 12 9A BE FE 7F 00 00 00 00 00 00 00 00 00 00
{216} normal block at 0x00000232E02AB730, 48 bytes long.
Data: < > C8 12 9A BE FE 7F 00 00 00 00 00 00 00 00 00 00
{214} normal block at 0x00000232E02AB5E0, 48 bytes long.
Data: < > C8 12 9A BE FE 7F 00 00 00 00 00 00 00 00 00 00
The most probable reason for a leak is that memory allocated for the object itself has not been deleted, because if the create and destroy functions are rewritten as below, then there is no leak
Suppose there is a c++ class structure, listed below
There are two functions which are used to delete and create the object, implementing the interface:
All works well, except the fact that each call of the create/destroy functions for the IString interface leads to a memory leak:
The leak looks like
The most probable reason for a leak is that memory allocated for the object itself has not been deleted, because if the create and destroy functions are rewritten as below, then there is no leak
Please, refer to the projects in the arhive, the
DO_LEAK
flag in cppLibraryRealClass.cpp can be used to reproduce the issue.TheLeakReprodution.zip
Please, use x64 platform to run and build both projects. The initial discussion is also available by the link #1890
The text was updated successfully, but these errors were encountered: