8 Aug
                
                    2013
                
            
            
                8 Aug
                
                '13
                
            
            
            
        
    
                7:37 p.m.
            
        On 7-8-2013 17:43, Eric Greveson wrote:
- I keep coming across code in Inkscape that could be improved with
 the RAII pattern (particularly, things like:
{ Thing *t = new Thing(); ... do stuff with t ... delete t; }
When writing new code, I'd much prefer to use smart pointers, e.g.
{ std::unique_ptr<Thing> t(new Thing()); ... do stuff with t ... }
Can't comment too smartly on this but... How about { Thing t; ... do stuff with t... }
;-)
Cheers, Johan