Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - controls
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

controls

 Post Reply Post Reply
Author
Message
Pariksh*t View Drop Down
Groupie
Groupie
Avatar

Joined: 26 June 2008
Location: India
Status: Offline
Points: 77
Post Options Post Options   Thanks (0) Thanks(0)   Quote Pariksh*t Quote  Post ReplyReply Direct Link To This Post Topic: controls
    Posted: 14 October 2009 at 1:04am
hi,
we have added controls in ribbonbar like
   CXTPControlStatic* pStatic0 = (CXTPControlStatic*)pGroupGallaries->Add(new CXTPControlStatic(), IDC_STATIC_DUMMY);
    pStatic0->SetWidth(5);
    pStatic0->SetHeight(20);

we have used new...
do we need to use delete as we have used new
please reply

Back to Top
Marcus View Drop Down
Groupie
Groupie


Joined: 04 June 2006
Location: Germany
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marcus Quote  Post ReplyReply Direct Link To This Post Posted: 14 October 2009 at 5:05am
If there's a memory leak, MFC will report it when your app exits in debug mode.
Back to Top
Pariksh*t View Drop Down
Groupie
Groupie
Avatar

Joined: 26 June 2008
Location: India
Status: Offline
Points: 77
Post Options Post Options   Thanks (0) Thanks(0)   Quote Pariksh*t Quote  Post ReplyReply Direct Link To This Post Posted: 14 October 2009 at 5:11am
thats true but do i need to explicitly handle it?
or is it handled by xtreme toolkit?
and if i need to handle it where i need to use delete operator?
Back to Top
Marcus View Drop Down
Groupie
Groupie


Joined: 04 June 2006
Location: Germany
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marcus Quote  Post ReplyReply Direct Link To This Post Posted: 14 October 2009 at 11:51am

If there's a leak, you will have to handle it, otherwise XT deleted the object.

Back to Top
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 931
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Posted: 15 October 2009 at 12:23pm
Set a break in the destructor of CXTPControlStatic and see if it is called for the instance you allocated (if there is more than one).
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.063 seconds.