> On Jan. 15, 2015, 7:43 p.m., Ben Mahler wrote: > > This is an extremely common pattern in the code, and so we should avoid > > doing it in an inconsistent manner. > > > > FWIW, we've yet to see leaks from this pattern, but if you want to make > > this change, let's do it as a broad sweep instead of introducing > > inconsistent code. :) > > Alexander Rukletsov wrote: > I think this particular example is a canonical case for using `Owned<>`. > I can file a JIRA to sweep the entire codebase, but I would keep this change. > If we agree that using `Owned<>` is preferable here, IMO it's not worth it to > postpone using it for consistency reason, though consistency is important. > > Niklas Nielsen wrote: > Did you guys reach consensus? If not, let's jump on a call and/or get > some 3rd party input > > Bernd Mathiske wrote: > Agree. Change all of these or none. BTW: if you are already discussing > this, why isn't anybody going for "* const" here? Respectively this would be > "const Owned<T>", which is what we want as it leaves the "T" part mutable.
Ok, agreed. I discard the review and file a JIRA for changing the pattern. - Alexander ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/29926/#review68303 ----------------------------------------------------------- On Jan. 15, 2015, 4:58 p.m., Alexander Rukletsov wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/29926/ > ----------------------------------------------------------- > > (Updated Jan. 15, 2015, 4:58 p.m.) > > > Review request for mesos, Bernd Mathiske and Niklas Nielsen. > > > Bugs: MESOS-2213 > https://issues.apache.org/jira/browse/MESOS-2213 > > > Repository: mesos-git > > > Description > ------- > > See summary. > > > Diffs > ----- > > src/allocation/allocator.hpp PRE-CREATION > > Diff: https://reviews.apache.org/r/29926/diff/ > > > Testing > ------- > > make check (Ubuntu, OS X) > > > Thanks, > > Alexander Rukletsov > >
