Click here to Skip to main content
16,004,969 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: C++ Question. Pin
David Crow19-Feb-04 7:52
David Crow19-Feb-04 7:52 
GeneralRe: C++ Question. Pin
Steve S19-Feb-04 23:16
Steve S19-Feb-04 23:16 
GeneralRe: C++ Question. Pin
WREY19-Feb-04 7:20
WREY19-Feb-04 7:20 
GeneralRe: C++ Question. Pin
WREY19-Feb-04 7:15
WREY19-Feb-04 7:15 
GeneralRe: C++ Question. Pin
David Crow19-Feb-04 7:22
David Crow19-Feb-04 7:22 
GeneralRe: C++ Question. Pin
WREY19-Feb-04 7:46
WREY19-Feb-04 7:46 
GeneralRe: C++ Question. Pin
WREY19-Feb-04 8:08
WREY19-Feb-04 8:08 
GeneralRe: C++ Question. Pin
David Crow19-Feb-04 9:14
David Crow19-Feb-04 9:14 
Well, not having everything in front of me, I may not be 100% accurate in reproducing this. I added the following to an existing project I was working on:

class CMyDialog : public CDialog
{
public:
    CMyDialog();
    ~CMyDialog()
    {
        delete pMySt[0][0];
    }
 
    BOOL OnInitDialog() 
    {
        CDialog::OnInitDialog();
 	
        pMySt[0][0] = new MyStruct();
 	
        return TRUE;
    }
 
    struct MyStruct
    {
    } *pMySt[10][10];
};
If the delete statement was commented out, a memory leak was indeed detected.


A rich person is not the one who has the most, but the one that needs the least.
GeneralRe: C++ Question. Pin
Andy Brummer19-Feb-04 10:04
sitebuilderAndy Brummer19-Feb-04 10:04 
GeneralWindows media player plugin Pin
rkyawal19-Feb-04 4:01
rkyawal19-Feb-04 4:01 
GeneralRe: Windows media player plugin Pin
Michael Dunn19-Feb-04 4:37
sitebuilderMichael Dunn19-Feb-04 4:37 
GeneralDialog fails to open Pin
TallAndyB19-Feb-04 3:48
TallAndyB19-Feb-04 3:48 
GeneralRe: Dialog fails to open Pin
RChin19-Feb-04 4:10
RChin19-Feb-04 4:10 
GeneralRe: Dialog fails to open Pin
TallAndyB19-Feb-04 4:19
TallAndyB19-Feb-04 4:19 
GeneralRe: Dialog fails to open Pin
David Crow19-Feb-04 5:45
David Crow19-Feb-04 5:45 
GeneralRe: Dialog fails to open Pin
TallAndyB19-Feb-04 6:39
TallAndyB19-Feb-04 6:39 
GeneralCDialogBar / MDI Question.. should be easy Pin
RobJones19-Feb-04 3:45
RobJones19-Feb-04 3:45 
GeneralNever mind.. Pin
RobJones19-Feb-04 6:10
RobJones19-Feb-04 6:10 
GeneralDatabase Design Question Pin
Nitron19-Feb-04 3:38
Nitron19-Feb-04 3:38 
GeneralRe: Database Design Question Pin
RChin19-Feb-04 4:21
RChin19-Feb-04 4:21 
GeneralRe: Database Design Question Pin
basementman19-Feb-04 8:05
basementman19-Feb-04 8:05 
Generaltime synchronisation Pin
styve19-Feb-04 3:36
styve19-Feb-04 3:36 
GeneralRe: time synchronisation Pin
David Crow19-Feb-04 5:50
David Crow19-Feb-04 5:50 
GeneralMake Edit Control un-editable Pin
J.B.19-Feb-04 3:27
J.B.19-Feb-04 3:27 
GeneralRe: Make Edit Control un-editable Pin
Maximilien19-Feb-04 3:37
Maximilien19-Feb-04 3:37 

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.