Click here to Skip to main content
       

C / C++ / MFC

 
QuestionCan we capture HD video using DirectShow C++/MFC .? Pinmembermbatra3118-Dec-12 0:30 
QuestionCWinApp::OnFileNew failed ? PinmemberCodzer17-Dec-12 20:23 
GeneralRe: CWinApp::OnFileNew failed ? PinmemberJochen Arndt17-Dec-12 22:33 
GeneralRe: CWinApp::OnFileNew failed ? PinmemberCodzer18-Dec-12 3:48 
AnswerRe: CWinApp::OnFileNew failed ? PinmemberJochen Arndt18-Dec-12 4:03 
QuestionLinked List Via Disk File [modified] Pinmemberimboared117-Dec-12 20:01 
SuggestionRe: Linked List Via Disk File PinmvpRichard MacCutchan17-Dec-12 23:15 
QuestionConfused with destructor PinmemberSuper Lloyd17-Dec-12 3:33 
I know if I have a class like that
class A
{
  shared_ptr<SomeType> data;
}
 
I don't need to declare a destructor, as the compiler will automatically write one for me that take care of everything.
 
But what if I have a resource without a destructor, such as a handle.
I need to implement a destructor
class A
{
  shared_ptr<SomeType> data;
  HANDLE wndobj;
 
  ~A() {
    CloseHandle(wndobj);
    // what of data? should I call data.reset()
  }
}
 
Do I need to handle all variable? or only those without destructor (i.e. wndobj)?
I.e. what of data?
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.

AnswerRe: Confused with destructor PinmemberErudite_Eric17-Dec-12 5:54 
GeneralRe: Confused with destructor PinmemberSuper Lloyd17-Dec-12 6:01 
GeneralRe: Confused with destructor Pinmemberjschell17-Dec-12 9:31 
GeneralRe: Confused with destructor PinmemberSuper Lloyd17-Dec-12 17:59 
GeneralRe: Confused with destructor Pinmembermegaadam18-Dec-12 4:51 
GeneralRe: Confused with destructor PinmemberStefan_Lang19-Dec-12 6:33 
GeneralRe: Confused with destructor PinmemberSuper Lloyd19-Dec-12 12:35 
GeneralRe: Confused with destructor PinmemberErudite_Eric21-Dec-12 0:20 
AnswerRe: Confused with destructor PinmemberStephen Hewitt17-Dec-12 18:10 
GeneralRe: Confused with destructor PinmemberSuper Lloyd17-Dec-12 22:41 
Questionfuzzy logic code Pinmemberrobot2916-Dec-12 4:10 
AnswerRe: fuzzy logic code PinmvpRichard MacCutchan16-Dec-12 5:25 
GeneralRe: fuzzy logic code Pinmemberrobot2920-Dec-12 5:01 
GeneralRe: fuzzy logic code PinmvpRichard MacCutchan20-Dec-12 5:16 
GeneralRe: fuzzy logic code Pinmemberrobot2920-Dec-12 6:26 
GeneralRe: fuzzy logic code PinmvpRichard MacCutchan20-Dec-12 6:37 
GeneralRe: fuzzy logic code Pinmemberrobot2920-Dec-12 6:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web04 | 2.8.141216.1 | Last Updated 18 Dec 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid