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

Re: New and Improved: Open in Visual Studio (patch attached)

From: Friedrich Brunzema <brunzefb_at_yahoo.com>
Date: Fri, 17 May 2013 11:21:45 -0700 (PDT)

Stefan,

Wow, I'm actually a bit surprised (but pleased) that you took my patch mostly as is.

I don't think I was leaking COM objects in my code, because I was using the compiler-generated smart pointers. These smart pointers [types ending in Ptr] use the _com_ptr_t<> class - stack based pointers will call Release() when they go out of scope. If you go to the definition of the pointer type, this becomes clear. Docs for this are here: [http://msdn.microsoft.com/en-us/library/417w8b3b.aspx]

But changing the smart pointer kind does not matter - one could now possibly simplify the dte80a.tlh down to the IID's required. (This .tlh file was generated automatically by a #import).

I'd be interested of what you think of the feature in general - useful? Do you still think it useful to extend this to support other development environment/editors in a configurable way?

best,

Friedrich

> On 17.05.2013 18:31, Friedrich Brunzema wrote:
> > Attached, please find the .zip file containing all the changed files.
>
> Thanks.
> Patch looks good. But I think you're leaking COM objects:
> result = ::GetActiveObject(clsid, NULL, &pUnk);
> pUnk (or PDTE) is never released.
> Same goes for pItemOperations a few lines down.
>
> Committed your patch in r24196 with a few modifications:
> * use of CComPtr<> to avoid the COM leaks
> * changed name of menu entry to clarify that it opens the local file,
> not the file as it appears in the selected revision
>
> 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=3055801

To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2013-05-17 20:30:01 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.