I cannot turn memoryleakdetector off.

35 views
Skip to first unread message

Jakob Clausen

unread,
Jun 26, 2023, 2:45:11 AM6/26/23
to cpputest
I know that I should not do this.
But I did.
I tried to turn of the memoryleakdetector.
And when I compile I get:

error: ‘saveAndDisableNewDeleteOverloads’ is not a member of ‘MemoryLeakWarningPlugin’ on
MemoryLeakWarningPlugin::saveAndDisableNewDeleteOverloads();
and
error: ‘restoreNewDeleteOverloads’ is not a member of ‘MemoryLeakWarningPlugin’
MemoryLeakWarningPlugin::restoreNewDeleteOverloads();

What should I do?

Bas Vodde

unread,
Jun 26, 2023, 3:45:27 AM6/26/23
to cpputest

Hi,

Strange. Forgot to include the header file ?

Bas

--
You received this message because you are subscribed to the Google Groups "cpputest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpputest+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cpputest/fbd48bb1-cfd5-44e2-830b-09d92cf772d8n%40googlegroups.com.

Jakob Clausen

unread,
Jun 26, 2023, 3:56:06 AM6/26/23
to cpputest
I use
#include <CppUTest/TestHarness.h>
And I had it working on another computer.

Bas Vodde

unread,
Jun 26, 2023, 4:09:28 AM6/26/23
to cppu...@googlegroups.com

Hi,

Ok, weird, perhaps check out the MemoryLeakWarningPlugin.h to see if these functions are really there.

And perhaps include the file directly (if they are) and see if that resolves it.

Thanks,

Bas

Jakob Clausen

unread,
Jun 26, 2023, 4:28:46 AM6/26/23
to cpputest
Good point. :-)
It turns out, that they are not.
Does this mean, that I am out of luck?

Bas Vodde

unread,
Jun 26, 2023, 4:31:34 AM6/26/23
to cppu...@googlegroups.com

Hi,

I’m not sure. You can check whether you can/should use a different version of CppUTest ?

But it is strange they aren’t there, they have been there for quite a while.

Bas

Jakob Clausen

unread,
Jun 26, 2023, 4:42:17 AM6/26/23
to cpputest
Do you know if there is another way of doing this?

Bas Vodde

unread,
Jun 27, 2023, 1:41:42 PM6/27/23
to cpputest

Hi,

I’m not sure what you are trying to achieve. There has AFAIK always been a way to disable the memory leak detection. I don’t know why it isn’t there in your
CppUTest version, that is weird. It is hard to see that via mail.

Thanks,

Bas


James W Grenning

unread,
Jun 27, 2023, 2:19:27 PM6/27/23
to cpputest

Jakob

Are you making CppUTest without memory leak detection, or your test-runner without memory leak detection.

How are you building CppUTest or your test-runner?

The problem is not clear to me. Can you send the error output.

Thanks, James

Reply all
Reply to author
Forward
0 new messages