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

Re: [patch, suggestion, notes] for Applying CAutoHandle (r21053, r21058)

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Mon, 28 Mar 2011 18:34:04 +0200

On 28.03.2011 18:02, Oto BREZINA wrote:
> On 2011-03-28 16:47, Stefan Küng wrote:
>>> Hey.
>>> AutoHandle should not be used for "preudo-handles" returned by GetCurrentProcess() and possibly some other functions - those pseudo-handles need not be closed. One such use is currentl inside RemotecCacheLink, maybe there're others I haven't found yet.
>> Yes, they don't *need* to be closed, but they *can* be closed.
>> So no reason not to use the auto handle classes for them.
> Interesting. As GetCurentProcess() pseudo-handle can be closed and share
> value with INVALID_HANDLE_VALUE, thus INVALID_HANDLE_VALUE can be closed
> too?
> Correct?

Yes, correct.
As stated in

"Calling the CloseHandle function with a pseudo handle has no effect.".


   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-03-28 18:34:17 CEST

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.