Skip to content

visual studio 2022 , memory leaks detector conflicts with jolt lib #1493

@v71

Description

@v71

Good day , i wanted to include jolt in my projects. Usually i add this piece of code to trace memory leaks

#if (_MFC_VER >= 0x0800)
#define _CRTDBG_MAP_ALLOC
#define _CRTDBG_MAP_ALLOC_NEW
#include <stdlib.h>
#include <crtdbg.h>
#else
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
#ifdef _DEBUG
#ifndef DBG_NEW
#define DBG_NEW new ( _NORMAL_BLOCK , FILE , LINE )
#define new DBG_NEW
#endif
#endif
#endif

I noticed that Jolt doesn't like and emits lots of errors regarding the use of the 'free' function.
I can't remove the code since i use to keep trace of memory usage, am I doing somethig wrong ?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions