Why all the memory leaks?

Hi

I’m at the point hunting for memory leaks with _CrtDumpMemoryLeaks() but it doesn’t seems like it’s my leakage??

If I debug my VST3 on PC with Reaper and shuts down Reaper the output in Visual Studio 2017 say’s

The thread 0x4cac has exited with code 0 (0x0).
Detected memory leaks!
Dumping objects ->
{14167} normal block at 0x000000000F1BA8B0, 88 bytes long.
 Data: <  Z     ( Z     > 90 FC 5A 0F F8 7F 00 00 28 FD 5A 0F F8 7F 00 00 
{14145} normal block at 0x000000000F1BAA90, 88 bytes long.
 Data: <  Z     ( Z     > 90 FC 5A 0F F8 7F 00 00 28 FD 5A 0F F8 7F 00 00 
{13857} normal block at 0x000000000F1FD140, 16 bytes long.
 Data: <                > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
{13856} normal block at 0x000000000F1BABD0, 88 bytes long.
 Data: <  Z     ( Z     > 90 FC 5A 0F F8 7F 00 00 28 FD 5A 0F F8 7F 00 00 
{13578} normal block at 0x000000000F238990, 24 bytes long.
 Data: < c[             > E0 63 5B 0F F8 7F 00 00 01 00 00 00 01 00 00 00 
{13338} normal block at 0x000000000F1FC150, 8 bytes long.
 Data: <0VS     > 30 56 53 00 00 00 00 00 
{13080} normal block at 0x000000000F1FB1B0, 16 bytes long.
 Data: <                > 98 0B 1C 0F 00 00 00 00 00 00 00 00 00 00 00 00 
{13078} normal block at 0x000000000F1C0B80, 104 bytes long.
 Data: <  W     X W     > C0 D5 57 0F F8 7F 00 00 58 D6 57 0F F8 7F 00 00 
{13077} normal block at 0x000000000F1FB520, 16 bytes long.
 Data: <                > 98 00 1C 0F 00 00 00 00 00 00 00 00 00 00 00 00 
{13075} normal block at 0x000000000F1C0080, 104 bytes long.
 Data: <  W     X W     > C0 D5 57 0F F8 7F 00 00 58 D6 57 0F F8 7F 00 00 
{12826} normal block at 0x000000000F237490, 32 bytes long.
 Data: <filled and strok> 66 69 6C 6C 65 64 20 61 6E 64 20 73 74 72 6F 6B 
{12825} normal block at 0x000000000F1FB250, 16 bytes long.
 Data: < >t             > 10 3E 74 0F F8 7F 00 00 00 00 00 00 00 00 00 00 
{12824} normal block at 0x000000000F1FBA70, 16 bytes long.
 Data: < =t             > E8 3D 74 0F F8 7F 00 00 00 00 00 00 00 00 00 00 
{12823} normal block at 0x000000000F1F96D0, 16 bytes long.
 Data: < =t             > C0 3D 74 0F F8 7F 00 00 00 00 00 00 00 00 00 00 
{11105} normal block at 0x0000000000493180, 136 bytes long.
 Data: <  Q       Q     > A8 0C 51 0F F8 7F 00 00 90 0B 51 0F F8 7F 00 00 
{10987} normal block at 0x000000000F99ED70, 104 bytes long.
 Data: <  W     X W     > C0 D5 57 0F F8 7F 00 00 58 D6 57 0F F8 7F 00 00 
{10986} normal block at 0x000000000F1F0080, 16 bytes long.
 Data: <X               > 58 E7 99 0F 00 00 00 00 00 00 00 00 00 00 00 00 
{10984} normal block at 0x000000000F99E740, 104 bytes long.
 Data: <  W     X W     > C0 D5 57 0F F8 7F 00 00 58 D6 57 0F F8 7F 00 00 
{10983} normal block at 0x000000000F1EFCC0, 16 bytes long.
 Data: <                > F8 E5 99 0F 00 00 00 00 00 00 00 00 00 00 00 00 
{10981} normal block at 0x000000000F99E5E0, 104 bytes long.
 Data: <  W     X W     > C0 D5 57 0F F8 7F 00 00 58 D6 57 0F F8 7F 00 00 
{10980} normal block at 0x000000000F284E80, 72 bytes long.
 Data: < N(      N(     > 80 4E 28 0F 00 00 00 00 80 4E 28 0F 00 00 00 00 
{10893} normal block at 0x000000000F9AE2B0, 32 bytes long.
 Data: <back-color-selec> 62 61 63 6B 2D 63 6F 6C 6F 72 2D 73 65 6C 65 63 
{10892} normal block at 0x000000000C362990, 16 bytes long.
 Data: <  t             > D8 B5 74 0F F8 7F 00 00 00 00 00 00 00 00 00 00 
{10891} normal block at 0x000000000F9AEDF0, 32 bytes long.
 Data: <font-color-selec> 66 6F 6E 74 2D 63 6F 6C 6F 72 2D 73 65 6C 65 63 
{10890} normal block at 0x000000000C362D00, 16 bytes long.
 Data: <@ t             > 40 B2 74 0F F8 7F 00 00 00 00 00 00 00 00 00 00 
{10889} normal block at 0x000000000C362940, 16 bytes long.
 Data: <  t             > F8 B8 74 0F F8 7F 00 00 00 00 00 00 00 00 00 00 
{10888} normal block at 0x000000000C3628F0, 16 bytes long.
 Data: <  t             > 18 AD 74 0F F8 7F 00 00 00 00 00 00 00 00 00 00 
{10887} normal block at 0x000000000F9ADEF0, 32 bytes long.
 Data: <draw-antialiased> 64 72 61 77 2D 61 6E 74 69 61 6C 69 61 73 65 64 
{10886} normal block at 0x000000000C3628A0, 16 bytes long.
 Data: <  t             > A8 A4 74 0F F8 7F 00 00 00 00 00 00 00 00 00 00 
{10885} normal block at 0x000000000F9AF4B0, 32 bytes long.
 Data: <gradient-end-col> 67 72 61 64 69 65 6E 74 2D 65 6E 64 2D 63 6F 6C 
{10884} normal block at 0x000000000C362760, 16 bytes long.
 Data: <  t             > F0 AC 74 0F F8 7F 00 00 00 00 00 00 00 00 00 00 
{10883} normal block at 0x000000000F9AE070, 32 bytes long.
 Data: <gradient-start-c> 67 72 61 64 69 65 6E 74 2D 73 74 61 72 74 2D 63 
{10882} normal block at 0x000000000C362850, 16 bytes long.
 Data: <H t             > 48 A0 74 0F F8 7F 00 00 00 00 00 00 00 00 00 00 
{10881} normal block at 0x000000000C362710, 16 bytes long.
 Data: <  t             > D0 B3 74 0F F8 7F 00 00 00 00 00 00 00 00 00 00 
{10880} normal block at 0x000000000C3626C0, 16 bytes long.
 Data: <  t             > F0 A7 74 0F F8 7F 00 00 00 00 00 00 00 00 00 00 
{10879} normal block at 0x000000000C362670, 16 bytes long.
 Data: <  t             > C8 AC 74 0F F8 7F 00 00 00 00 00 00 00 00 00 00 
{10878} normal block at 0x000000000F9AF210, 32 bytes long.
 Data: <shadow-blur-size> 73 68 61 64 6F 77 2D 62 6C 75 72 2D 73 69 7A 65 
{10877} normal block at 0x000000000C3624E0, 16 bytes long.
 Data: <x t             > 78 A7 74 0F F8 7F 00 00 00 00 00 00 00 00 00 00 
{10876} normal block at 0x000000000F9AF450, 32 bytes long.
 Data: <shadow-intensity> 73 68 61 64 6F 77 2D 69 6E 74 65 6E 73 69 74 79 
{10809} normal block at 0x000000000F9ACCF0, 32 bytes long.
 Data: <gradient-highlig> 67 72 61 64 69 65 6E 74 2D 68 69 67 68 6C 69 67 
{10808} normal block at 0x000000000C363160, 16 bytes long.
 Data: <  t             > 88 A6 74 0F F8 7F 00 00 00 00 00 00 00 00 00 00 
{10807} normal block at 0x000000000F9ACC30, 32 bytes long.
 Data: <icon-text-margin> 69 63 6F 6E 2D 74 65 78 74 2D 6D 61 72 67 69 6E 
{10806} normal block at 0x000000000C3614F0, 16 bytes long.
 Data: <8 t             > 38 B5 74 0F F8 7F 00 00 00 00 00 00 00 00 00 00 
{10805} normal block at 0x000000000C3614A0, 16 bytes long.
 Data: <H t             > 48 AF 74 0F F8 7F 00 00 00 00 00 00 00 00 00 00 
{10804} normal block at 0x000000000F9ACAB0, 32 bytes long.
 Data: <icon-highlighted> 69 63 6F 6E 2D 68 69 67 68 6C 69 67 68 74 65 64 
{10803} normal block at 0x000000000C3612C0, 16 bytes long.
 Data: <  t             > 88 AB 74 0F F8 7F 00 00 00 00 00 00 00 00 00 00 
{10123} normal block at 0x000000000F96BEE0, 32 bytes long.
 Data: <text-color-highl> 74 65 78 74 2D 63 6F 6C 6F 72 2D 68 69 67 68 6C 
{10122} normal block at 0x000000000C358EE0, 16 bytes long.
 Data: < Wt             > 00 57 74 0F F8 7F 00 00 00 00 00 00 00 00 00 00 
{10121} normal block at 0x000000000C3587B0, 16 bytes long.
 Data: < St             > 90 53 74 0F F8 7F 00 00 00 00 00 00 00 00 00 00 
{10120} normal block at 0x000000000C358BC0, 16 bytes long.
 Data: < St             > E0 53 74 0F F8 7F 00 00 00 00 00 00 00 00 00 00 
{10119} normal block at 0x000000000F96BCA0, 32 bytes long.
 Data: <placeholder-titl> 70 6C 61 63 65 68 6F 6C 64 65 72 2D 74 69 74 6C 
{10118} normal block at 0x000000000C359610, 16 bytes long.
 Data: <HKt             > 48 4B 74 0F F8 7F 00 00 00 00 00 00 00 00 00 00 

And after a billion more lines that I've cut out..

Object dump complete.

I don’t recognize the output coming from my code, is this leakage or is it just me not getting the information right?

Is this normal? False positives?
According to Microsoft “is unable to tell the difference between user allocations and internal library allocations.” etc…

Thanks in advance
Regards

Hi,
Hhm, did you open the UIDescription editor in this session? I noted sometimes that it causes memory leaks but this is nothing to worry about as long as it does not happen under normal using conditions…

1 Like

If you are using a virtual processor implementation class to deal with single/double precision implementation then be sure it has a virtual destructor. That hooked me up once … every class that is used polymorphically should have a (preferrably =default ed) virtual destructor or else it might not be destroyed properly (see C++ Core Guidelines).

1 Like

Hello Mc-Zen

Hhm, did you open the UIDescription editor

Well I think I did, will try again to see.

polymorphically should have a (preferrably =default ed) virtual destructor or else it might

And this I do

Thanks for the heads up, I feel that I must double check what you’ve mentioned here.