Document template problem
-
HI! In my code, I create a document template in the following way:
pDocTemplate = new CMultiDocTemplate(IDR_PHYSEDIT,
RUNTIME_CLASS(CPhysEditDoc),
RUNTIME_CLASS(CPhysEditFrame),
RUNTIME_CLASS(CPhysEditView));
if (!pDocTemplate)
return FALSE;
AddDocTemplate(pDocTemplate);Everything works perfectly, but when the program exits I get the following output: e:\work\c++\project\utilities.cpp(117) : {58} client block at 0x003F4B40, subtype c0, 140 bytes long. a CMultiDocTemplate object at $003F4B40, 140 bytes long {56} normal block at 0x003F49F8, 78 bytes long. Data: < 6 = = > D0 0D 36 10 3D 00 00 00 3D 00 00 00 01 00 00 00 My question is: How do I clean up the document template objects on exit? Shouldn't CWinApp do that? øivind
-
HI! In my code, I create a document template in the following way:
pDocTemplate = new CMultiDocTemplate(IDR_PHYSEDIT,
RUNTIME_CLASS(CPhysEditDoc),
RUNTIME_CLASS(CPhysEditFrame),
RUNTIME_CLASS(CPhysEditView));
if (!pDocTemplate)
return FALSE;
AddDocTemplate(pDocTemplate);Everything works perfectly, but when the program exits I get the following output: e:\work\c++\project\utilities.cpp(117) : {58} client block at 0x003F4B40, subtype c0, 140 bytes long. a CMultiDocTemplate object at $003F4B40, 140 bytes long {56} normal block at 0x003F49F8, 78 bytes long. Data: < 6 = = > D0 0D 36 10 3D 00 00 00 3D 00 00 00 01 00 00 00 My question is: How do I clean up the document template objects on exit? Shouldn't CWinApp do that? øivind
dolph_loe wrote: My question is: How do I clean up the document template objects on exit? Shouldn't CWinApp do that? You don't. CYourApp will delete the doc template object in its destructor. Can you set the breakpoint in your app destructor and step into CWinApp::~CWinApp from there? Tomasz Sowinski -- http://www.shooltz.com
Alika masiaka!
-
dolph_loe wrote: My question is: How do I clean up the document template objects on exit? Shouldn't CWinApp do that? You don't. CYourApp will delete the doc template object in its destructor. Can you set the breakpoint in your app destructor and step into CWinApp::~CWinApp from there? Tomasz Sowinski -- http://www.shooltz.com
Alika masiaka!