Click here to Skip to main content
15,890,506 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionresource leak in destructor? Pin
George_George9-Oct-08 3:27
George_George9-Oct-08 3:27 
AnswerRe: resource leak in destructor? Pin
CPallini9-Oct-08 3:42
mveCPallini9-Oct-08 3:42 
GeneralRe: resource leak in destructor? Pin
George_George9-Oct-08 18:07
George_George9-Oct-08 18:07 
GeneralRe: resource leak in destructor? Pin
CPallini9-Oct-08 21:50
mveCPallini9-Oct-08 21:50 
GeneralRe: resource leak in destructor? Pin
George_George9-Oct-08 22:18
George_George9-Oct-08 22:18 
GeneralRe: resource leak in destructor? Pin
CPallini10-Oct-08 0:17
mveCPallini10-Oct-08 0:17 
GeneralRe: resource leak in destructor? Pin
George_George10-Oct-08 0:33
George_George10-Oct-08 0:33 
AnswerRe: resource leak in destructor? Pin
led mike9-Oct-08 4:26
led mike9-Oct-08 4:26 
George_George wrote:
I am not sure whether my concern is correct or no such issue -- e.g. member's destructor will always be called or not, even if I do not wrap them with auto_ptr?


You are kidding right? With all the esoteric question you ask around here when you don't even know how destructors work. That is exactly why in the past I suggested you stop investigating some of the issues you were on about. You need to stick to fundamentals until you get a firm grasp of them. Until then you are basically lost.

Ah yes, just below is yet another good example:
George_George wrote:
For the following code, on x86 build, the output is

000000C8
000000C8

and on x64 build, the output is

CCCCCCCC000000C8
00000000000000C8


You are looking at and questioning what the compiler generates when you don't even know how destructors work. That makes no sense at all. It's even worse for someone that is constantly claiming they are trying to make sense of things. Unsure | :~



led mike

GeneralRe: resource leak in destructor? Pin
Mark Salsbery9-Oct-08 5:21
Mark Salsbery9-Oct-08 5:21 
GeneralRe: resource leak in destructor? Pin
Roger Stoltz9-Oct-08 5:30
Roger Stoltz9-Oct-08 5:30 
GeneralRe: resource leak in destructor? Pin
led mike9-Oct-08 5:32
led mike9-Oct-08 5:32 
GeneralRe: resource leak in destructor? Pin
George_George9-Oct-08 18:09
George_George9-Oct-08 18:09 
QuestionRe: resource leak in destructor? Pin
CPallini9-Oct-08 22:05
mveCPallini9-Oct-08 22:05 
AnswerRe: resource leak in destructor? Pin
George_George9-Oct-08 22:19
George_George9-Oct-08 22:19 
AnswerRe: resource leak in destructor? Pin
led mike10-Oct-08 4:34
led mike10-Oct-08 4:34 
GeneralRe: resource leak in destructor? Pin
Mark Salsbery10-Oct-08 5:22
Mark Salsbery10-Oct-08 5:22 
GeneralRe: resource leak in destructor? Pin
led mike10-Oct-08 5:26
led mike10-Oct-08 5:26 
AnswerRe: resource leak in destructor? Pin
gscotti9-Oct-08 4:42
gscotti9-Oct-08 4:42 
GeneralRe: resource leak in destructor? Pin
George_George9-Oct-08 18:13
George_George9-Oct-08 18:13 
QuestionCListCtrl:SetItemState hiding or disabling items? Pin
Cem Usta9-Oct-08 1:52
Cem Usta9-Oct-08 1:52 
AnswerRe: CListCtrl:SetItemState hiding or disabling items? Pin
CPallini9-Oct-08 2:09
mveCPallini9-Oct-08 2:09 
QuestionBug while compiling Pin
manustone9-Oct-08 1:11
manustone9-Oct-08 1:11 
AnswerRe: Bug while compiling Pin
Alan Balkany9-Oct-08 4:00
Alan Balkany9-Oct-08 4:00 
GeneralRe: Bug while compiling Pin
manustone9-Oct-08 5:25
manustone9-Oct-08 5:25 
QuestionIt still gives "Unknown Publisher" error even after signing ActiveX control Pin
dharmesh@krishtechnologies.net8-Oct-08 23:27
dharmesh@krishtechnologies.net8-Oct-08 23:27 

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.