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

C / C++ / MFC

 
GeneralRe: Calling CWnd::MoveWindow from within OnSize handler - CRASH Pin
Terry O'Nolley25-Sep-03 16:35
Terry O'Nolley25-Sep-03 16:35 
GeneralRe: Calling CWnd::MoveWindow from within OnSize handler - CRASH Pin
Shog925-Sep-03 18:57
sitebuilderShog925-Sep-03 18:57 
GeneralRe: Calling CWnd::MoveWindow from within OnSize handler - CRASH Pin
Terry O'Nolley26-Sep-03 4:11
Terry O'Nolley26-Sep-03 4:11 
GeneralRe: Calling CWnd::MoveWindow from within OnSize handler - CRASH Pin
Shog926-Sep-03 4:46
sitebuilderShog926-Sep-03 4:46 
GeneralRe: Calling CWnd::MoveWindow from within OnSize handler - CRASH Pin
Abin25-Sep-03 21:32
Abin25-Sep-03 21:32 
GeneralRe: Calling CWnd::MoveWindow from within OnSize handler - CRASH Pin
FearlessBurner26-Sep-03 0:15
FearlessBurner26-Sep-03 0:15 
Generalfree memory Pin
Sirrius25-Sep-03 15:01
Sirrius25-Sep-03 15:01 
GeneralRe: free memory Pin
Larry J. Siddens25-Sep-03 16:12
Larry J. Siddens25-Sep-03 16:12 
Not sure what your asking...

If you allocated memory with "new", then use "delete" and set the pointer to NULL. If you did it with "malloc", then use "free" and set the pointer.

What you could do, is create a destructor for a struct and clean up there.

Example:

struct Stuff
{
Stuff() { p = NULL, i = 0; }
~Stuff() { delete [] p; p = NULL; }
int i;
char* p;
};

using:

{
Stuff x;
x.p = new char[10];
ASSERT( x.p );
x.i = 10;

< other usage >

} // cleanup, item will be destroyed.




Larry J. Siddens
Cornerstone Communications

TAME THE DOCUMENT MONSTER
www.unifier.biz
GeneralVisual C++ and Standard C++ Pin
RanBlade25-Sep-03 13:53
RanBlade25-Sep-03 13:53 
GeneralRe: Visual C++ and Standard C++ Pin
Taka Muraoka25-Sep-03 14:09
Taka Muraoka25-Sep-03 14:09 
GeneralRe: Visual C++ and Standard C++ Pin
RanBlade25-Sep-03 14:15
RanBlade25-Sep-03 14:15 
GeneralRe: Visual C++ and Standard C++ Pin
RanBlade25-Sep-03 14:17
RanBlade25-Sep-03 14:17 
GeneralRe: Visual C++ and Standard C++ Pin
Taka Muraoka25-Sep-03 14:31
Taka Muraoka25-Sep-03 14:31 
GeneralRe: Visual C++ and Standard C++ Pin
Joe Woodbury25-Sep-03 18:16
professionalJoe Woodbury25-Sep-03 18:16 
GeneralSimple operation with window minimized... Pin
Anonymous25-Sep-03 13:30
Anonymous25-Sep-03 13:30 
GeneralC and memory help Pin
Sirrius25-Sep-03 12:39
Sirrius25-Sep-03 12:39 
GeneralRe: C and memory help Pin
Larry J. Siddens25-Sep-03 13:03
Larry J. Siddens25-Sep-03 13:03 
GeneralRe: C and memory help Pin
Sirrius25-Sep-03 14:46
Sirrius25-Sep-03 14:46 
GeneralRe: C and memory help Pin
Larry J. Siddens25-Sep-03 15:02
Larry J. Siddens25-Sep-03 15:02 
GeneralID of a child dialog Pin
Antti Keskinen25-Sep-03 11:42
Antti Keskinen25-Sep-03 11:42 
GeneralRe: ID of a child dialog Pin
Antti Keskinen25-Sep-03 11:49
Antti Keskinen25-Sep-03 11:49 
GeneralApp is crashing when trying to restore Brushes and Fonts Pin
Terry O'Nolley25-Sep-03 9:56
Terry O'Nolley25-Sep-03 9:56 
GeneralRe: App is crashing when trying to restore Brushes and Fonts Pin
Alvaro Mendez25-Sep-03 10:19
Alvaro Mendez25-Sep-03 10:19 
GeneralRe: App is crashing when trying to restore Brushes and Fonts Pin
Terry O'Nolley25-Sep-03 10:46
Terry O'Nolley25-Sep-03 10:46 
GeneralRe: App is crashing when trying to restore Brushes and Fonts Pin
Michael Dunn25-Sep-03 10:32
sitebuilderMichael Dunn25-Sep-03 10: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.