Click here to Skip to main content
16,005,467 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Memory Leaks Pin
Ravi Bhavnani2-May-02 6:05
professionalRavi Bhavnani2-May-02 6:05 
GeneralRe: Memory Leaks Pin
Paresh Solanki2-May-02 6:43
Paresh Solanki2-May-02 6:43 
GeneralRe: Memory Leaks Pin
Tom Archer2-May-02 5:42
Tom Archer2-May-02 5:42 
GeneralRe: Memory Leaks Pin
Niklas L2-May-02 5:44
Niklas L2-May-02 5:44 
GeneralRe: Memory Leaks Pin
dazinith2-May-02 5:51
dazinith2-May-02 5:51 
GeneralRe: Memory Leaks Pin
Niklas L2-May-02 6:00
Niklas L2-May-02 6:00 
GeneralRe: Memory Leaks Pin
Ravi Bhavnani2-May-02 6:03
professionalRavi Bhavnani2-May-02 6:03 
GeneralRe: Memory Leaks Pin
dazinith2-May-02 6:05
dazinith2-May-02 6:05 
welp i think i found where the leak is.. but i don't know whats wrong with the code.. if i comment out this chunk of code i only get 1 memory leak.. if i dont comment it out i get 8.. anyone have any suggestions as to whats wrong with this? basicly im just setting dates for a couple date pickers..


//Setup the date picker
m_cdPeriodEnd.SetFormat(_T("MM/dd/yyyy")); // force short date format to MM/dd/yyyy
m_cdPeriodBegin.SetFormat(_T("MM/dd/yyyy"));
COleDateTime dtMin(2002,7,31,0,0,0); // set the minimum date which can be chosen
COleDateTime dtMax(2003,6,30,0,0,0); // set the maximum date which can be chosen

// verify the min and max dates are valid, then set the range for the date picker
if ((dtMin.GetStatus() == COleDateTime::valid) && (dtMax.GetStatus() == COleDateTime::valid))
{
m_cdPeriodEnd.SetRange(&dtMin,&dtMax);
m_cdPeriodBegin.SetRange(&dtMin,&dtMax);
}
else
{
if (dtMin.GetStatus() != COleDateTime::valid)
AfxMessageBox("This program has attempted to set an invalid minimum date for selection.");
if (dtMax.GetStatus() != COleDateTime::valid)
AfxMessageBox("This program has attempted to set an invalid maximum date for selection.");
CDialog::EndDialog(IDABORT);
}


-dz
GeneralRe: Memory Leaks Pin
dazinith2-May-02 6:20
dazinith2-May-02 6:20 
GeneralRe: The VC++ way to point out memory leak for you! Pin
Maxwell Chen2-May-02 7:04
Maxwell Chen2-May-02 7:04 
GeneralRe: The VC++ way to point out memory leak for you! Pin
Anders Molin2-May-02 8:45
professionalAnders Molin2-May-02 8:45 
GeneralRe: The VC++ way to point out memory leak for you! Pin
Maxwell Chen2-May-02 17:10
Maxwell Chen2-May-02 17:10 
GeneralRe: Memory Leaks Pin
Roger Allen2-May-02 23:24
Roger Allen2-May-02 23:24 
General#if directive Pin
_Magnus_2-May-02 5:06
_Magnus_2-May-02 5:06 
GeneralRe: #if directive Pin
Tom Archer2-May-02 5:11
Tom Archer2-May-02 5:11 
GeneralRe: #if directive Pin
_Magnus_2-May-02 5:24
_Magnus_2-May-02 5:24 
GeneralRe: #if directive Pin
Tom Archer2-May-02 5:35
Tom Archer2-May-02 5:35 
GeneralRe: #if directive Pin
_Magnus_2-May-02 5:44
_Magnus_2-May-02 5:44 
GeneralRe: #if directive Pin
Tom Archer2-May-02 5:46
Tom Archer2-May-02 5:46 
GeneralRe: #if directive Pin
_Magnus_2-May-02 5:55
_Magnus_2-May-02 5:55 
GeneralRe: #if directive Pin
Tom Archer2-May-02 5:59
Tom Archer2-May-02 5:59 
GeneralRe: #if directive Pin
David Viggiano2-May-02 5:29
David Viggiano2-May-02 5:29 
GeneralRe: #if directive Pin
_Magnus_2-May-02 5:41
_Magnus_2-May-02 5:41 
GeneralRe: #if directive Pin
Tom Archer2-May-02 5:42
Tom Archer2-May-02 5:42 
GeneralRe: #if directive Pin
Maxwell Chen2-May-02 7:24
Maxwell Chen2-May-02 7:24 

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.