Click here to Skip to main content
15,895,538 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Help Needed for getting record from database Pin
Roger Broomfield19-Dec-07 19:41
Roger Broomfield19-Dec-07 19:41 
GeneralRe: Help Needed for getting record from database Pin
Y_Kaushik19-Dec-07 19:53
Y_Kaushik19-Dec-07 19:53 
GeneralRe: Help Needed for getting record from database Pin
Y_Kaushik19-Dec-07 20:01
Y_Kaushik19-Dec-07 20:01 
GeneralRe: Help Needed for getting record from database Pin
Y_Kaushik19-Dec-07 20:36
Y_Kaushik19-Dec-07 20:36 
QuestionNeed help with restricting window movement to the screen... Pin
demxine19-Dec-07 16:35
demxine19-Dec-07 16:35 
GeneralRe: Need help with restricting window movement to the screen... Pin
Maxwell Chen19-Dec-07 16:45
Maxwell Chen19-Dec-07 16:45 
QuestionRe: Need help with restricting window movement to the screen... [modified] Pin
demxine19-Dec-07 19:47
demxine19-Dec-07 19:47 
GeneralFake Memory Leak!! Pin
Lea Hayes19-Dec-07 16:06
Lea Hayes19-Dec-07 16:06 
Hi,

The program that I am working on uses two external DLL modules.

[program.exe] uses [library.dll]
[library.dll] uses [another_library.dll]

I have stepped through the program line by line, and have used the CRT break on allocation debugging feature. Upon exiting the program in debug mode within visual studio, it reports a lot of memory leaks. However, I believe these messages to be false.

Here is basically what happens.

[program.exe]
-->CMFCApplication
---->Initialise();
------>[library.dll]
-------->AllocateSomeMemory();
---------->[another_library.dll]
------------>AllocateSomeMoreMemory();

When the application closes I have confirmed that the processes exit in the following order:

[library.dll], [another_library.dll], [program.exe].

When [library.dll] exits the 'Output' panel within visual studio indicates that there is a memory leak. The memory is then released by [another_library.dll] after the leak has been reported within the output panel.

All three modules use the /MDd (Debug) /MD (Release) switches for multi-threaded dll, so they each share exactly the same memory manager.

Is there a way which I can force the DLL processes to be terminated in the specific order:
[another_library.dll], [library.dll], [program.exe]? Because I am confident that this will resolve the issue. I understand that it is probably safe for me to ignore this warning output...but future (problemsome) memory leaks will be masked by the fake ones. This could lead to some serious problems.

Any advice would be greatly appreciated...this is driving me nuts! Dead | X|

Lea Hayes
GeneralRe: Fake Memory Leak!! [modified] Pin
Maxwell Chen19-Dec-07 16:34
Maxwell Chen19-Dec-07 16:34 
GeneralRe: Fake Memory Leak!! Pin
Lea Hayes19-Dec-07 21:14
Lea Hayes19-Dec-07 21:14 
GeneralRe: Fake Memory Leak!! Pin
Roger Broomfield19-Dec-07 17:09
Roger Broomfield19-Dec-07 17:09 
GeneralRe: Fake Memory Leak!! Pin
Lea Hayes19-Dec-07 22:02
Lea Hayes19-Dec-07 22:02 
GeneralDestroy/Close the window Pin
CodingLover19-Dec-07 14:21
CodingLover19-Dec-07 14:21 
GeneralRe: Destroy/Close the window Pin
CodingLover19-Dec-07 17:54
CodingLover19-Dec-07 17:54 
GeneralRe: Destroy/Close the window Pin
Mark Salsbery20-Dec-07 6:01
Mark Salsbery20-Dec-07 6:01 
GeneralRe: Destroy/Close the window Pin
CodingLover31-Dec-07 17:41
CodingLover31-Dec-07 17:41 
GeneralRe: Destroy/Close the window Pin
Mark Salsbery2-Jan-08 7:58
Mark Salsbery2-Jan-08 7:58 
QuestionHow to know Project type Pin
s196675m19-Dec-07 14:00
s196675m19-Dec-07 14:00 
AnswerRe: How to know Project type Pin
Hamid_RT19-Dec-07 18:06
Hamid_RT19-Dec-07 18:06 
Generalgdiplusimaging.h error Pin
Anthony Appleyard19-Dec-07 11:54
Anthony Appleyard19-Dec-07 11:54 
GeneralRe: gdiplusimaging.h error Pin
Mark Salsbery20-Dec-07 6:38
Mark Salsbery20-Dec-07 6:38 
Questionoperator << inherited? Pin
Budric B.19-Dec-07 11:48
Budric B.19-Dec-07 11:48 
AnswerRe: operator << inherited? Pin
Lea Hayes19-Dec-07 16:15
Lea Hayes19-Dec-07 16:15 
GeneralRe: operator << inherited? Pin
Budric B.20-Dec-07 4:53
Budric B.20-Dec-07 4:53 
GeneralRe: operator << inherited? Pin
Lea Hayes20-Dec-07 12:05
Lea Hayes20-Dec-07 12:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.