[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tortoisesvn-dev
Subject:    Re: MFC question: is it really necessary to call DeleteObject?
From:       "Andreas Nicolai" <Andreas.Nicolai () gmx ! net>
Date:       2007-10-10 16:15:54
Message-ID: op.tzzosswut8lo91 () helium
[Download RAW message or body]

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic