From tortoisesvn-dev Wed Oct 10 16:15:54 2007 From: "Andreas Nicolai" Date: Wed, 10 Oct 2007 16:15:54 +0000 To: tortoisesvn-dev Subject: Re: MFC question: is it really necessary to call DeleteObject? Message-Id: X-MARC-Message: https://marc.info/?l=tortoisesvn-dev&m=119203296608705 Hi Stefan, > The problem with automatically deleting GDI objects is that you hide > some problems: you can't really delete a GDI object that's selected into > a device context. To *really* delete a GDI object, you must first select > the previous GDI object into the DC, *then* delete the object. > By using auto-deleting objects, you cheat leak checkers because they > then won't find the not-really-deleted object. Hmm, I see the problem and I'm sure there is somewhere a perfect solution out there. But for now I guess I just go through the code and clean up objects manually... that's probably the fastest way. At least compared to writing a wrapper around the device context and implementing an own SelectObject function to keep track of those things. 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