> On Dec. 22, 2015, 4:52 a.m., Benjamin Hindman wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/jsonify.hpp, line 120
> > <https://reviews.apache.org/r/41593/diff/2/?file=1173648#file1173648line120>
> >
> >     It seems weird to not be making this virtual ...
> 
> Michael Park wrote:
>     Probably because of the fact that public inheritance typically requires a 
> `virtual` destructor (without the `virtual` destructor, deletion through a 
> base pointer doesn't work correctly).
>     
>     For example,
>     
>     ```cpp
>     class Base { ~Base() { ... } };
>     class Derived : public Base { ~Derived() { ... } };
>     
>     Base* base = new Derived;
>     delete base;  // `~Derived` not called!
>     ```
>     
>     In this case however I'm using private inheritance which is basically 
> aggregation (I've outlined other alternative we can take instead of private 
> inheritance in the previous issue). So `Base* base = new Derived;` doesn't 
> even compile, and therefore deletion through a base pointer can't happen.

Resolved by removing the `Writer` base class.


- Michael


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41593/#review111575
-----------------------------------------------------------


On Jan. 4, 2016, 7:28 p.m., Michael Park wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41593/
> -----------------------------------------------------------
> 
> (Updated Jan. 4, 2016, 7:28 p.m.)
> 
> 
> Review request for mesos and Benjamin Hindman.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/README.md 
> a2a3dc6120b10c8fe82088b9f0ebecfa5642f945 
>   3rdparty/libprocess/3rdparty/stout/include/Makefile.am 
> b2dea9b93adfa3ea0415a0b5c81a369dd29b6cfe 
>   3rdparty/libprocess/3rdparty/stout/include/stout/jsonify.hpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/41593/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Michael Park
> 
>

Reply via email to