[
https://issues.apache.org/jira/browse/MESOS-2238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14363864#comment-14363864
]
Alexander Rukletsov commented on MESOS-2238:
--------------------------------------------
To use {{unique_ptr}} we should bump minimal supported version of {{gcc}}
first. IIUC, {{Owned<>}} has the same semantics in our codebase as
{{unique_ptr}} and should be migrated to {{unique_ptr}}. I'd rather have either
{{Owned<>}} or {{unique_ptr}} in the codebase instead of having them both.
[~bmahler], [~benjaminhindman] any input here?
> Use Owned<> for Process pointers in wrapper classes
> ---------------------------------------------------
>
> Key: MESOS-2238
> URL: https://issues.apache.org/jira/browse/MESOS-2238
> Project: Mesos
> Issue Type: Improvement
> Reporter: Alexander Rukletsov
> Assignee: Akanksha Agrawal
> Labels: easyfix, newbie
>
> A common pattern in our code (see e.g. {{Isolator}}, {{DockerContainerizer}},
> {{Allocator}}) is to wrap Process-based class into a non Process-one.
> However, our code base is inconsistent about how we store the pointer to the
> underlying class: somewhere we wrap it into {{Owned<>}} (see e.g.
> {{Isolator}}, {{DockerContainerizer}}), somewhere it is a raw pointer (see
> e.g. {{Allocator}}, {{ExternalContainerizer}}).
> Using {{Owned<>}} for this particular case is preferable, since it hints the
> reader about the correct semantics and intention. For consistency reason,
> sweep through the code base and replace raw pointers with its {{Owned<>}}
> counterpart.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)