Click here to Skip to main content
15,560,073 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how to get motherboard SN Pin
Richard MacCutchan2-Nov-12 1:37
mveRichard MacCutchan2-Nov-12 1:37 
QuestionChart Control Pin
Tom Paronis1-Nov-12 7:04
Tom Paronis1-Nov-12 7:04 
AnswerRe: Chart Control Pin
Richard MacCutchan1-Nov-12 7:48
mveRichard MacCutchan1-Nov-12 7:48 
GeneralRe: Chart Control Pin
Tom Paronis1-Nov-12 8:34
Tom Paronis1-Nov-12 8:34 
QuestionCopy CDC Pin
_Flaviu31-Oct-12 23:29
_Flaviu31-Oct-12 23:29 
AnswerRe: Copy CDC Pin
Santhosh G_1-Nov-12 2:38
Santhosh G_1-Nov-12 2:38 
GeneralRe: Copy CDC Pin
_Flaviu1-Nov-12 3:20
_Flaviu1-Nov-12 3:20 
QuestionStrange memory leak Pin
miniman0631-Oct-12 22:58
miniman0631-Oct-12 22: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 | :) .
AnswerRe: Strange memory leak Pin
Sivaraman Dhamodharan31-Oct-12 23:45
Sivaraman Dhamodharan31-Oct-12 23:45 
GeneralRe: Strange memory leak Pin
miniman061-Nov-12 0:10
miniman061-Nov-12 0:10 
AnswerRe: Strange memory leak Pin
Rolf Kristensen31-Oct-12 23:47
Rolf Kristensen31-Oct-12 23:47 
GeneralRe: Strange memory leak Pin
miniman061-Nov-12 0:11
miniman061-Nov-12 0:11 
AnswerRe: Strange memory leak Pin
Santhosh G_1-Nov-12 0:22
Santhosh G_1-Nov-12 0:22 
GeneralRe: Strange memory leak Pin
miniman061-Nov-12 0:31
miniman061-Nov-12 0:31 
AnswerRe: Strange memory leak Pin
Jochen Arndt1-Nov-12 0:35
professionalJochen Arndt1-Nov-12 0:35 
GeneralRe: Strange memory leak Pin
miniman061-Nov-12 1:09
miniman061-Nov-12 1:09 
GeneralRe: Strange memory leak Pin
Jochen Arndt1-Nov-12 1:29
professionalJochen Arndt1-Nov-12 1:29 
AnswerRe: Strange memory leak Pin
BCN-1631-Nov-12 17:01
BCN-1631-Nov-12 17:01 
Questionabout accessing PDF file, compile error. Pin
BCN-16331-Oct-12 16:18
BCN-16331-Oct-12 16:18 
AnswerRe: about accessing PDF file, compile error. Pin
Richard MacCutchan1-Nov-12 0:41
mveRichard MacCutchan1-Nov-12 0:41 
GeneralRe: about accessing PDF file, compile error. Pin
BCN-1631-Nov-12 16:56
BCN-1631-Nov-12 16:56 
GeneralRe: about accessing PDF file, compile error. Pin
Richard MacCutchan1-Nov-12 23:35
mveRichard MacCutchan1-Nov-12 23:35 
GeneralRe: about accessing PDF file, compile error. Pin
BCN-1634-Nov-12 14:39
BCN-1634-Nov-12 14:39 
QuestionHow correctly to check up availability of a XP theme? Pin
Eugene Pustovoyt31-Oct-12 3:10
Eugene Pustovoyt31-Oct-12 3:10 
AnswerRe: How correctly to check up availability of a XP theme? Pin
Jochen Arndt31-Oct-12 3:54
professionalJochen Arndt31-Oct-12 3:54 

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.