Click here to Skip to main content
15,882,278 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Foreground process Pin
Sebastian Schneider2-Jun-06 5:01
Sebastian Schneider2-Jun-06 5:01 
GeneralRe: Foreground process Pin
Zac Howland2-Jun-06 5:25
Zac Howland2-Jun-06 5:25 
GeneralRe: Foreground process Pin
Sebastian Schneider2-Jun-06 7:46
Sebastian Schneider2-Jun-06 7:46 
GeneralRe: Foreground process Pin
Zac Howland2-Jun-06 8:02
Zac Howland2-Jun-06 8:02 
GeneralRe: Foreground process Pin
Sebastian Schneider2-Jun-06 8:27
Sebastian Schneider2-Jun-06 8:27 
GeneralRe: Foreground process Pin
Nemanja Trifunovic2-Jun-06 4:53
Nemanja Trifunovic2-Jun-06 4:53 
GeneralRe: Foreground process Pin
Sebastian Schneider2-Jun-06 5:03
Sebastian Schneider2-Jun-06 5:03 
Questiondelete in ctor ! Pin
vikramlinux2-Jun-06 2:16
vikramlinux2-Jun-06 2:16 
Hi friends,
Can I do like this

class CodeProject
{
public:
CodeProject()
{
delete this;
}
~CodeProject()
{
}
};

int main()
{
CodeProject *object= new CodeProject();
return 0;
}

Please Assume that I am always going to allocate memory on heap using new.
AnswerRe: delete in ctor ! Pin
toxcct2-Jun-06 2:19
toxcct2-Jun-06 2:19 
AnswerRe: delete in ctor ! Pin
Ștefan-Mihai MOGA2-Jun-06 2:21
professionalȘtefan-Mihai MOGA2-Jun-06 2:21 
GeneralRe: delete in ctor ! Pin
vikramlinux2-Jun-06 2:26
vikramlinux2-Jun-06 2:26 
AnswerRe: delete in ctor ! [modified] Pin
Chris Losinger2-Jun-06 2:23
professionalChris Losinger2-Jun-06 2:23 
NewsRe: delete in ctor ! [modified] Pin
Roland Pibinger2-Jun-06 4:06
Roland Pibinger2-Jun-06 4:06 
GeneralRe: delete in ctor ! Pin
Chris Losinger2-Jun-06 4:43
professionalChris Losinger2-Jun-06 4:43 
GeneralRe: delete in ctor ! Pin
Roger Stoltz2-Jun-06 5:00
Roger Stoltz2-Jun-06 5:00 
GeneralRe: delete in ctor ! Pin
Chris Losinger2-Jun-06 5:08
professionalChris Losinger2-Jun-06 5:08 
GeneralRe: delete in ctor ! Pin
Roger Stoltz2-Jun-06 5:42
Roger Stoltz2-Jun-06 5:42 
GeneralRe: delete in ctor ! Pin
Chris Losinger2-Jun-06 5:48
professionalChris Losinger2-Jun-06 5:48 
GeneralRe: delete in ctor ! Pin
Roger Stoltz2-Jun-06 6:16
Roger Stoltz2-Jun-06 6:16 
GeneralRe: delete in ctor ! Pin
Nemanja Trifunovic2-Jun-06 5:05
Nemanja Trifunovic2-Jun-06 5:05 
AnswerRe: delete in ctor ! Pin
BadKarma2-Jun-06 3:15
BadKarma2-Jun-06 3:15 
GeneralRe: delete in ctor ! Pin
toxcct2-Jun-06 3:35
toxcct2-Jun-06 3:35 
GeneralRe: delete in ctor ! Pin
Zac Howland2-Jun-06 3:47
Zac Howland2-Jun-06 3:47 
GeneralRe: delete in ctor ! Pin
Roger Stoltz2-Jun-06 4:23
Roger Stoltz2-Jun-06 4:23 
GeneralRe: delete in ctor ! Pin
BadKarma2-Jun-06 4:32
BadKarma2-Jun-06 4:32 

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.