[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

MFC question: is it really necessary to call DeleteObject?

From: Andreas Nicolai <Andreas.Nicolai_at_gmx.net>
Date: 2007-10-10 02:57:47 CEST

Hi there,

after creating a font

     CFont myFont;
     myFont.CreatePointFont(...);

and setting a font to the device context with

     CFont * oldFont = dc.SelectObject(&myFont);

and restoring it with

     dc.SelectObject(oldFont);

do I really have to delete the object with

     myFont.DeleteObject();

as it is written in the MFC docs?

If that is really necessary it has been forgotten many times in the
MyGraph.cpp.

Bye,
Andreas

-- 
Andreas Nicolai                         anicolai@syr.edu
PhD Candidate, M.A.M.E                  (315) 443-2218
Syracuse University
151 Link Hall
Syracuse, NY, 13244
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Wed Oct 10 02:58:23 2007

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.