Replace Util::ptr_shared with std::shared_ptr

Bug #1614037 reported by Alex Valavanis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Triaged
Low
Unassigned

Bug Description

We currently define our own shared pointer class in src/util/share.h

Since C++11 has now been adopted in lp:inkscape, we should replace the usage of ptr_shared with the shared_ptr class, as defined in the standard <memory> C++ header, and delete our own implementation.

The standard implementation is likely to be more robust than ours and more recognisable to new contributors, so it makes sense to migrate.

This is feature is very widely adopted in current C++ implementations, so it should be safe for us to use right away.

Tags: code-design
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Also, ptr_shared<char> (for storing a C-style string) will often be better handled as a std::string

description: updated
description: updated
Changed in inkscape:
milestone: none → 1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.