Repository: arrow
Updated Branches:
  refs/heads/master ff39cb5e1 -> 8ceee5662


ARROW-1543: [C++] Correct C++ tutorial to use std::unique_ptr instead of 
std::shared_ptr

Author: Wes McKinney <wes.mckin...@twosigma.com>

Closes #1157 from wesm/ARROW-1543 and squashes the following commits:

82e7593f [Wes McKinney] Add missing namespace
8afcc602 [Wes McKinney] Tweaks
7df6dd23 [Wes McKinney] Correct C++ tutorial to use std::unique_ptr instead of 
std::shared_ptr


Project: http://git-wip-us.apache.org/repos/asf/arrow/repo
Commit: http://git-wip-us.apache.org/repos/asf/arrow/commit/8ceee566
Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/8ceee566
Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/8ceee566

Branch: refs/heads/master
Commit: 8ceee56622c9503b75d1c1023747f2e3c28be109
Parents: ff39cb5
Author: Wes McKinney <wes.mckin...@twosigma.com>
Authored: Wed Oct 4 11:04:57 2017 -0400
Committer: Wes McKinney <wes.mckin...@twosigma.com>
Committed: Wed Oct 4 11:04:57 2017 -0400

----------------------------------------------------------------------
 cpp/apidoc/tutorials/row_wise_conversion.md | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/arrow/blob/8ceee566/cpp/apidoc/tutorials/row_wise_conversion.md
----------------------------------------------------------------------
diff --git a/cpp/apidoc/tutorials/row_wise_conversion.md 
b/cpp/apidoc/tutorials/row_wise_conversion.md
index e91c26e..5d61eca 100644
--- a/cpp/apidoc/tutorials/row_wise_conversion.md
+++ b/cpp/apidoc/tutorials/row_wise_conversion.md
@@ -57,12 +57,15 @@ is referenced by the offsets in the former array.
 // the underlying memory regions in-place. At the moment, arrow::jemalloc is 
only
 // supported on Unix systems, not Windows.
 
-arrow::Int64Builder id_builder(arrow::default_memory_pool());
-arrow::DoubleBuilder cost_builder(arrow::default_memory_pool());
-std::shared_ptr<DoubleBuilder> components_values_builder =
-    std::make_shared<DoubleBuilder>(arrow::default_memory_pool());
-arrow::ListBuilder components_builder(arrow::default_memory_pool(),
-    components_values_builder);
+using arrow::DoubleBuilder;
+using arrow::Int64Builder;
+using arrow::ListBuilder;
+
+arrow::MemoryPool* pool = arrow::default_memory_pool();
+Int64Builder id_builder(pool);
+DoubleBuilder cost_builder(pool);
+std::unique_ptr<DoubleBuilder> components_values_builder(new 
DoubleBuilder(pool));
+ListBuilder components_builder(pool, std::move(components_values_builder));
 ```
 
 Now we can loop over our existing data and insert it into the builders. The

Reply via email to