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

Re: Patch - leaking file handles and minor issues in ContextMenu

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Tue, 25 Jan 2011 20:26:13 +0100

On 25.01.2011 11:16, Dmitry wrote:
> Hey.
>
> CShellExt::WriteClipboardPathsToTempFile() leaks file handles on edge cases and also has
> - too wide scope of variables
> - unused variable
> - unneeded extra copying of string
>
> Attached is an untested patch that addresses that.

Committed in r20766.
But I tweaked your patch a little bit: I'd like to declare buffers
outside a loop since not all compilers are smart enough. Declaring them
inside the loop can lead to repeated stack allocations/deallocations of
the buffer for every loop run. Just to be safe here, I'd like to do that
outside the loops.

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=2700416
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-01-25 20:26:49 CET

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.