-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory leaks when inlcuding the libary in MFC project #99
Comments
Did you ever find a solution to this problem? |
Nope. I am not sure where to look though. |
I'm experiencing the same memory leaks.
I wonder this issue will be fixed by someone? [Adding comments] |
You try
|
I have the same problem. |
I have the same problem. How can fix this issue |
you can try it like this:open "Projects->properties->Linker->input" in "Additional Dependencies" add
mfc120ud.lib
mfcm120ud.lib
vs2017:
mfc140ud.lib
mfcm140ud.lib
At 2020-05-06 12:24:18, "Jack" <[email protected]> wrote:
I have the same problem. How can fix this issue
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Curry, Thanks for your proposal,
But I used vs2019, I can NOT find any files like the mfcxxxx.lib.
Thanks.
Best Regrards,
Jack Yuan
From: Curry-Messi
Date: 2020-05-12 09:13
To: microsoft/cpprestsdk
CC: Jack; Comment
Subject: Re: [microsoft/cpprestsdk] Memory leaks when inlcuding the libary in MFC project (#99)
you can try it like this:open "Projects->properties->Linker->input" in "Additional Dependencies" add
mfc120ud.lib
mfcm120ud.lib
vs2017:
mfc140ud.lib
mfcm140ud.lib
At 2020-05-06 12:24:18, "Jack" <[email protected]> wrote:
I have the same problem. How can fix this issue
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Hi, we have an large Multibyte MFC Project and we also get the FALSE Positive leaks. Did anyone have an solution or an idea? What can we do to solve this problem? |
I think this is because the statics in cpprest are cleared up after MFC calls _CrtDumpMemoryLeaks(), its a false positive. The solution described here worked for me: I had to compile my own version of cpprest though with that new class. |
It's right. I solved problem this way
|
I have created an test MFC project to remove every dependency. cpprest.zip. Compiled with visual studio 2013.
I have added the project using NuGet.
After executing the project visual studio reports a lot of memory leaks.
I have added visual leak detector, but that reports no leaks (First two lines of the pastebin).
See http://pastebin.com/KdLDtAf6.
Adding the cpprest120d_2_8.dll to the delayed dll import (linker->input) solves most of the leaks (only leaks of #67 remain).
However, I receive "cannot delay load 'cpprest120d_2_8.dll' " when using the http_client class.
When uncommenting the "CreateRequest" functions, even more memory leaks happen.
These are also reported by Visual Leak Detector.
See http://pastebin.com/wGWdEuBB
Anyone knows where the leaks are coming from or how I can ignore them?
The text was updated successfully, but these errors were encountered: