|
-
April 15th, 1999, 09:58 AM
#1
How to destroy a CFont Object that I create
Hello, All.
For a CFont object that I create, I need to destroy the object when I am done using it. Otherwise will cause a space wasted. But what is the right way to destroy the object ?
please see the following case:
CFont NewFont;
CFont *pOldFont;
NewFont.CreateFont();
pOldFont = pDC->SelectObject(&NewFont);
....
pDC->SelectObject(pOldFont);
After I select pOldFont back, Do I need to delete the NewFont and How to ? or the destructor of NewFont will take care of this thing ?
Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|