Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Use move semantics rather than shared_ptr for Vector Tile data #9167

Closed

Description

@springmeyer

shared_ptr predated the addition of VectorTileLayerData and comes from the definition of Response. I believe this was originally done to avoid string copies. Might be better to use move semantics now.

Surfacing this potential cleanup/optimization from #7939 (comment)

Also, currently in the vector-tile code we used std::move on shared_ptr which is odd and likely not needed (refs

VectorTileFeature::VectorTileFeature(protozero::pbf_reader feature_pbf, std::shared_ptr<VectorTileLayerData> layerData_)
: layerData(std::move(layerData_)) {
)

/cc @jfirebaugh @anandthakker

Activity

  1. added
    Core
    on Jun 2, 2017
  2. springmeyer commented on Aug 25, 2017

    @springmeyer
    ContributorAuthor

    Addresses the problem in #9167 by changing the GeometryTileData interface to return owning handles to GeometryTileLayer, which we can then retain in SymbolLayout so that the SymbolFeature handles don't end up with dangling handles.

    Per ^^ from #9312 I'm consider this done. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Corerefactor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions