Has anyone tried Deleaker with their JUCE projects and how is it?

Has anyone tried Deleaker with their JUCE projects (and Visual Studio 2019) - and how is it?

https://www.deleaker.com/

Completely unnecessary.

Would you care to elaborate? that’s not very specific…

I’m currently using Virtual Lead Detector with VS2019, and every now and then it prints something like:

“VLD: New allocation at already allocated address: 0x000002220AF203F0 with size: 84 and new size: 84”.

I didn’t use to see this; it seems recent. This worries me, and I cannot get any more info about it. I was wondering if Deleaker might be of use…

JUCE already has its own leak detection for JUCE related objects. You can easily use the same macros as them to force leak detection on your own objects too.

System-specific leaks (GDI etc.) are not really your concern as they are abstracted away from you in JUCE and as such are a JUCE problem.

It seems to me you are looking for problems. Do you have unexplained crashes? Do you actually have a leak? Is your plugin or program leaking memory?

You actually find JUCE leak detection adequate? Have you ever used something that provides more detail, like Visual Leak Detector? I like to be told exactly where in the code the leak is coming from; not that “some class” was leaked. It’s better than nothing, but hardly great.

I work mainly on the Mac; then move over to Windows every now and then to check what I’ve done. No, not having crashes; however when I start seeing messages on a new compile that I have not seen previously, it’s a source of concern. I’ve tried to narrow it down to changes made since the last time I ran it on Windows, but not having any luck. Anyway, have you actually tried the Deleaker program?

Thanks. But have you ever used the Deleaker program? if not, how do you know it does not add something useful?

Incidentally, I have tried the Microsoft CRT library you linked to. I am unable to get any line numbers when posting memory leaks. Just useless dumps.

I put this at the top of my PluginProcessor.h file:

#include "JuceHeader.h"

#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>

I put this in my PluginProcessor constructor:

_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );

I purposely do not free some objects, and upon exit of the AudioPluginHost, where I am debugging it as an attached process, it prints out:

Detected memory leaks!
Dumping objects ->
{54664} normal block at 0x000001F80F17B0E0, 64 bytes long.
 Data: <                > 00 00 00 00 CD CD CD CD F8 CF 16 0F F8 01 00 00 
{54663} normal block at 0x000001F80F17A8E0, 64 bytes long.
 Data: <                > 00 00 00 00 CD CD CD CD 20 CF 16 0F F8 01 00 00 

[...] etc.

No line numbers or any helpful information. I seem to recall that you cannot use this in JUCE because of issues like: