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

Re: r21936 is damn suspicious

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Tue, 06 Sep 2011 19:04:16 +0200

On 06.09.2011 07:53, Dmitry wrote:
> Hey.
>
> 05.09.11, 22:20, "Stefan Küng"<tortoisesvn_at_gmail.com>:
>
>>> May I wonder why r21936 was committed?
>> To reduce the memory allocated on the stack by allocating the
>> memory on the heap instead.
> I wonder if that reduction is for the sake of reduction or stack
> allocation was causing observable problem.

Better be safe than sorry :)

>
>>> Currently it uses raw pointers and this is not exception-safe.
>>> Also
>> I don't quite see the problem here?
> Well, if an exception is thrown between "new" and "delete" the latter
> in not invoked and the object is leaked. That's why we have auto_ptr,
> auto_buffer and a gazillion of other classes.

Sure, but using auto_ptr or something similar only makes sense if we
would actually catch the exception - but we don't. Instead, an exception
would trigger the crash report dialog so the memory leak is not a problem.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=2835938
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-09-06 19:04:42 CEST

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