Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id CD5F8200CC2 for ; Wed, 5 Jul 2017 17:00:48 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id CBEA416386B; Wed, 5 Jul 2017 15:00:48 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1F39F163867 for ; Wed, 5 Jul 2017 17:00:47 +0200 (CEST) Received: (qmail 22221 invoked by uid 500); 5 Jul 2017 15:00:46 -0000 Mailing-List: contact dev-help@orc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@orc.apache.org Delivered-To: mailing list dev@orc.apache.org Received: (qmail 21679 invoked by uid 99); 5 Jul 2017 15:00:45 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Jul 2017 15:00:45 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 01A73DFC25; Wed, 5 Jul 2017 15:00:45 +0000 (UTC) From: AnatoliShein To: dev@orc.apache.org Reply-To: dev@orc.apache.org References: In-Reply-To: Subject: [GitHub] orc pull request #134: Orc 17 Content-Type: text/plain Message-Id: <20170705150045.01A73DFC25@git1-us-west.apache.org> Date: Wed, 5 Jul 2017 15:00:45 +0000 (UTC) archived-at: Wed, 05 Jul 2017 15:00:49 -0000 Github user AnatoliShein commented on a diff in the pull request: https://github.com/apache/orc/pull/134#discussion_r125668140 --- Diff: c++/src/OrcHdfsFile.cc --- @@ -66,22 +64,22 @@ namespace orc { options = config->GetOptions(); } hdfs::IoService * io_service = hdfs::IoService::New(); - //Wrapping fs into a shared pointer to guarantee deletion - std::shared_ptr fs(hdfs::FileSystem::New(io_service, "", options)); - if (!fs) { + //Wrapping file_system into a unique pointer to guarantee deletion + file_system = std::unique_ptr(hdfs::FileSystem::New(io_service, "", options)); + if (!file_system) { --- End diff -- Yes, unique pointer actually supports this notation (thanks to [operator bool](http://en.cppreference.com/w/cpp/memory/unique_ptr/operator_bool)) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---