Click here to Skip to main content
15,913,939 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to return value after user input Pin
Richard MacCutchan3-Nov-12 6:07
mveRichard MacCutchan3-Nov-12 6:07 
GeneralRe: how to return value after user input Pin
Member 21198443-Nov-12 7:12
Member 21198443-Nov-12 7:12 
GeneralRe: how to return value after user input Pin
Richard MacCutchan3-Nov-12 8:03
mveRichard MacCutchan3-Nov-12 8:03 
GeneralRe: how to return value after user input Pin
Member 21198443-Nov-12 15:40
Member 21198443-Nov-12 15:40 
GeneralRe: how to return value after user input Pin
Richard MacCutchan3-Nov-12 21:23
mveRichard MacCutchan3-Nov-12 21:23 
GeneralRe: how to return value after user input Pin
Member 21198443-Nov-12 22:59
Member 21198443-Nov-12 22:59 
SuggestionRe: how to return value after user input Pin
David Crow4-Nov-12 16:28
David Crow4-Nov-12 16:28 
Questionproblem with sprintf_s() on win 7 Pin
Member 93537761-Nov-12 21:57
Member 93537761-Nov-12 21:57 
AnswerRe: problem with sprintf_s() on win 7 Pin
Santhosh G_1-Nov-12 22:34
Santhosh G_1-Nov-12 22:34 
GeneralRe: problem with sprintf_s() on win 7 Pin
Member 93537764-Nov-12 16:46
Member 93537764-Nov-12 16:46 
GeneralRe: problem with sprintf_s() on win 7 Pin
Santhosh G_4-Nov-12 17:08
Santhosh G_4-Nov-12 17:08 
AnswerRe: problem with sprintf_s() on win 7 Pin
CPallini1-Nov-12 22:48
mveCPallini1-Nov-12 22:48 
GeneralRe: problem with sprintf_s() on win 7 Pin
Member 93537764-Nov-12 16:46
Member 93537764-Nov-12 16:46 
GeneralRe: problem with sprintf_s() on win 7 Pin
CPallini4-Nov-12 22:02
mveCPallini4-Nov-12 22:02 
AnswerRe: problem with sprintf_s() on win 7 Pin
Sarath C5-Nov-12 22:14
Sarath C5-Nov-12 22:14 
AnswerRe: problem with sprintf_s() on win 7 Pin
Member 935377613-Nov-12 22:48
Member 935377613-Nov-12 22:48 
Questionhow to get motherboard SN Pin
buffay1-Nov-12 19:42
buffay1-Nov-12 19:42 
AnswerRe: how to get motherboard SN Pin
Richard MacCutchan2-Nov-12 0:37
mveRichard MacCutchan2-Nov-12 0:37 
QuestionChart Control Pin
Tom Paronis1-Nov-12 6:04
Tom Paronis1-Nov-12 6:04 
AnswerRe: Chart Control Pin
Richard MacCutchan1-Nov-12 6:48
mveRichard MacCutchan1-Nov-12 6:48 
GeneralRe: Chart Control Pin
Tom Paronis1-Nov-12 7:34
Tom Paronis1-Nov-12 7:34 
QuestionCopy CDC Pin
_Flaviu31-Oct-12 22:29
_Flaviu31-Oct-12 22:29 
AnswerRe: Copy CDC Pin
Santhosh G_1-Nov-12 1:38
Santhosh G_1-Nov-12 1:38 
GeneralRe: Copy CDC Pin
_Flaviu1-Nov-12 2:20
_Flaviu1-Nov-12 2:20 
QuestionStrange memory leak Pin
miniman0631-Oct-12 21:58
miniman0631-Oct-12 21:58 
C++
//process.h
private:
    PROCESSENTRY32 * m_proc;
    char * m_filename;
    bool m_stringupdated;

//process.cpp
Process::Process()
{
   m_proc = new PROCESSENTRY32;
   m_proc->dwSize = sizeof(PROCESSENTRY32);
   m_stringupdated = false;
   m_filename = NULL;
}
//process.cpp
Process::~Process()
{
    delete m_proc;
    if(m_filename)
	delete [] m_filename;
}

//main
Process * allo = new Process();
allo->~Process();

VLD reports:
Visual Leak Detector Version 2.2.3 installed.
WARNING: Visual Leak Detector detected memory leaks!
---------- Block 1 at 0x005A2100: 12 bytes ----------
  Call Stack:
    c:\users\jean\documents\visual studio 2012\projects\procenum\procenum\procenum.cpp (26): ProcEnum.exe!wmain + 0x7 bytes
    f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (533): ProcEnum.exe!__tmainCRTStartup + 0x19 bytes
    f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (377): ProcEnum.exe!wmainCRTStartup
    0x760A33AA (File and line number not available): kernel32.dll!BaseThreadInitThunk + 0x12 bytes
    0x76CF9EF2 (File and line number not available): ntdll.dll!RtlInitializeExceptionChain + 0x63 bytes
    0x76CF9EC5 (File and line number not available): ntdll.dll!RtlInitializeExceptionChain + 0x36 bytes
  Data:
    48 21 5A 00    00 00 00 00    00 CD CD CD                    H!Z..... ........


Visual Leak Detector detected 1 memory leak (48 bytes).
Largest number used: 640 bytes.
Total allocations: 640 bytes.
Visual Leak Detector is now exiting.
The program '[10680] ProcEnum.exe' has exited with code 0 (0x0).


I'm freaking out guys I just don't see the leak ,Thanks in advance Smile | :) .

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.