tdf#99352: explicit ctoring of VclPtrs?

Stephan Bergmann sbergman at redhat.com
Tue Mar 7 15:05:40 UTC 2017


On 03/07/2017 03:07 PM, Bjoern Michaelsen wrote:
> On Tue, Mar 07, 2017 at 02:58:31PM +0200, Noel Grandin wrote:
>> I can't see how that would flush out any bugs.
>
> E.g. In a local debug build I added metadata on where a VclPtr was created (via
> __FILE__, __LINE__) so that I could learn where they were leaked from without
> hunting them down individually in the debugger.

So if you want to make such instrumentation of VclPtr ctor, it's not 
much hassle to add that instrumentation also to the from-raw-ptr 
VclPtr::operator=?

>> What is more likely to flush out bugs (and what would make sberg very
>> happy), would be to remove the current auto-conversion-to-T* operator, since
>> that would make explicit the places where we are passing around raw pointers
>> instead of VclPtr<T>

Yes, that would be my thought too.  Looks more promising to invest 
energy in that direction.


More information about the LibreOffice mailing list