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

C / C++ / MFC

 
GeneralRe: Assigning one to another Pin
lucy23-Aug-02 9:55
lucy23-Aug-02 9:55 
GeneralRe: Assigning one set to another Pin
Pavel Klocek23-Aug-02 13:38
Pavel Klocek23-Aug-02 13:38 
Generalwhich control to use Pin
ns23-Aug-02 9:32
ns23-Aug-02 9:32 
GeneralRe: which control to use Pin
John Fisher23-Aug-02 10:16
John Fisher23-Aug-02 10:16 
GeneralMFC ActiveX dual interface and Font Property Page Pin
John Fisher23-Aug-02 9:14
John Fisher23-Aug-02 9:14 
Questioncd rom cache? Pin
particle2k23-Aug-02 8:37
particle2k23-Aug-02 8:37 
Generaldestructor question Pin
ns23-Aug-02 8:39
ns23-Aug-02 8:39 
GeneralRe: destructor question Pin
Navin23-Aug-02 8:58
Navin23-Aug-02 8:58 
The destructor runs in two cases:
1. When the object goes out of scope
2. When delete is called on an object that was created with new

AFAIK, if you create an object using new, and forget to delete it (memory leak), the destructor won't get called.

Hope this helps...

Some examples:
void MyFunc()
{
  SomeObject :bob:;

  // ...
  // Some code here

}  // <- :bob:'s destructor would be called here, when we exit
   //  the function

void MyFunc2()
{
  SomeObject *:bob: = new SomeObject;

  // ...
  // some code here
  delete :bob:;  // <- p:bob:'s destructor gets called here.
}
 

There are three types of people in this world: those who can count, and those who can't.

GeneralRe: destructor question Pin
Paul M Watt23-Aug-02 9:02
mentorPaul M Watt23-Aug-02 9:02 
GeneralRe: destructor question Pin
ns23-Aug-02 9:10
ns23-Aug-02 9:10 
GeneralRe: destructor question Pin
John Fisher23-Aug-02 9:07
John Fisher23-Aug-02 9:07 
GeneralRe: destructor question Pin
ns23-Aug-02 9:14
ns23-Aug-02 9:14 
GeneralSTL set iterator - simple question Pin
ns23-Aug-02 8:11
ns23-Aug-02 8:11 
GeneralRe: STL set iterator - simple question Pin
Stuart Dootson23-Aug-02 8:26
professionalStuart Dootson23-Aug-02 8:26 
GeneralRe: STL set iterator -very cool! Pin
ns23-Aug-02 8:43
ns23-Aug-02 8:43 
GeneralRichEdit Question Pin
Nick Parker23-Aug-02 6:59
protectorNick Parker23-Aug-02 6:59 
GeneralRe: RichEdit Question Pin
Chris Losinger23-Aug-02 7:11
professionalChris Losinger23-Aug-02 7:11 
GeneralRe: RichEdit Question Pin
Nick Parker23-Aug-02 7:28
protectorNick Parker23-Aug-02 7:28 
GeneralRe: RichEdit Question Pin
Chris Losinger23-Aug-02 7:39
professionalChris Losinger23-Aug-02 7:39 
GeneralRe: RichEdit Question Pin
Nick Parker23-Aug-02 8:12
protectorNick Parker23-Aug-02 8:12 
GeneralSetting a wait cursor on a dialog using pure Win32 Pin
Todd Jeffreys23-Aug-02 6:46
Todd Jeffreys23-Aug-02 6:46 
GeneralRe: Setting a wait cursor on a dialog using pure Win32 Pin
Tomasz Sowinski23-Aug-02 6:54
Tomasz Sowinski23-Aug-02 6:54 
GeneralRe: Setting a wait cursor on a dialog using pure Win32 Pin
Todd Jeffreys23-Aug-02 7:12
Todd Jeffreys23-Aug-02 7:12 
GeneralRe: Setting a wait cursor on a dialog using pure Win32 Pin
Tomasz Sowinski23-Aug-02 7:18
Tomasz Sowinski23-Aug-02 7:18 
GeneralRe: Setting a wait cursor on a dialog using pure Win32 Pin
Todd Jeffreys23-Aug-02 7:40
Todd Jeffreys23-Aug-02 7:40 

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.