Click here to Skip to main content
16,011,500 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Use of extern Pin
Xzyx987X28-Jun-04 23:01
Xzyx987X28-Jun-04 23:01 
GeneralRe: Use of extern Pin
sweep12328-Jun-04 23:22
sweep12328-Jun-04 23:22 
GeneralRe: Use of extern Pin
Rick York29-Jun-04 6:16
mveRick York29-Jun-04 6:16 
GeneralRe: Use of extern Pin
Johnny ²29-Jun-04 4:48
Johnny ²29-Jun-04 4:48 
GeneralAnimateWindow() Question Pin
User 58385228-Jun-04 21:37
User 58385228-Jun-04 21:37 
GeneralSetting up Visual C++ .NET to break on a windows error Pin
Xzyx987X28-Jun-04 20:48
Xzyx987X28-Jun-04 20:48 
QuestionWay to Prevent memeory leak? Pin
nachilau28-Jun-04 20:29
nachilau28-Jun-04 20:29 
AnswerRe: Way to Prevent memeory leak? Pin
User 58385228-Jun-04 20:43
User 58385228-Jun-04 20:43 
Im not sure i fully understand.
If you program has hit a fatal error and is exiting then you could probably not worry and rely on the OS to clean up after you.

Perhaps you could use a smart pointer

A smart pointer is usually a template class that pretends to be a pointer by providing the -> and * operators.
Because the smart pointer itself is on the stack its destructor will be called and you can delete the memory then.
I think the stl has a smart ptr template. You might want to start there

However if your Assert() function never returns then that wont work either.

Why dont you throw an exception in your Assert() function and catch it at a higher level

Good luck
GeneralRe: Way to Prevent memeory leak? Pin
nachilau28-Jun-04 21:09
nachilau28-Jun-04 21:09 
GeneralRe: Way to Prevent memeory leak? Pin
User 58385228-Jun-04 21:34
User 58385228-Jun-04 21:34 
AnswerRe: Way to Prevent memeory leak? Pin
wb28-Jun-04 21:42
wb28-Jun-04 21:42 
GeneralRe: Way to Prevent memeory leak? Pin
nachilau28-Jun-04 21:51
nachilau28-Jun-04 21:51 
GeneralRe: Way to Prevent memeory leak? Pin
wb28-Jun-04 22:05
wb28-Jun-04 22:05 
GeneralSerial Communication in WIN CE Pin
Chinnaa Ganesh Kumar28-Jun-04 20:07
Chinnaa Ganesh Kumar28-Jun-04 20:07 
Generalstd::queue and Managed class Pin
Vadim Tabakman28-Jun-04 19:54
Vadim Tabakman28-Jun-04 19:54 
GeneralRe: std::queue and Managed class Pin
Nemanja Trifunovic29-Jun-04 7:23
Nemanja Trifunovic29-Jun-04 7:23 
GeneralRe: std::queue and Managed class Pin
Vadim Tabakman29-Jun-04 13:36
Vadim Tabakman29-Jun-04 13:36 
GeneralQuestion on prefix and post fix Pin
rohit.dhamija28-Jun-04 19:49
rohit.dhamija28-Jun-04 19:49 
GeneralRe: Question on prefix and post fix Pin
PJ Arends28-Jun-04 19:57
professionalPJ Arends28-Jun-04 19:57 
GeneralRe: Question on prefix and post fix Pin
Ian Darling29-Jun-04 2:57
Ian Darling29-Jun-04 2:57 
GeneralRe: Question on prefix and post fix Pin
Vadim Tabakman28-Jun-04 19:58
Vadim Tabakman28-Jun-04 19:58 
GeneralRe: Question on prefix and post fix Pin
rohit.dhamija28-Jun-04 20:14
rohit.dhamija28-Jun-04 20:14 
GeneralRe: Question on prefix and post fix Pin
Vadim Tabakman28-Jun-04 20:28
Vadim Tabakman28-Jun-04 20:28 
GeneralSOAP 3.0 Question Pin
NeoHobbit28-Jun-04 19:28
NeoHobbit28-Jun-04 19:28 
GeneralZoom In and Zoom Out Pin
aparajita28-Jun-04 19:28
aparajita28-Jun-04 19:28 

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.