Re: Reduce 99% of your memory leaks with this simple trick!

2018-01-15 Thread Tianqi Chen
Add them to contributor guide if needed, that is what contributor guide is for. We only need a few pages of things instead of a book which people won't comprehend, in a short period. The current guidelines include the style Guide and I suggest we add follow RAII when possible Tianqi On Mon,

Re: Reduce 99% of your memory leaks with this simple trick!

2018-01-15 Thread Pedro Larroy
There's tons of books on "best practices", some even outdated. But the question is, do we think it ads value to our project to have a small distilled list of good software engineering and specific language practices and idioms that We decide to stick with in our project? This could be a one or two

Re: Reduce 99% of your memory leaks with this simple trick!

2018-01-11 Thread Marco de Abreu
We'd like to add automate coverity statistic generation to CI, but no ETA yet. -Marco Am 12.01.2018 4:36 vorm. schrieb "Chris Olivier" : > I think there's tons of books on "best practices" already, so I wouldn't > want to trouble you :) > > Are we running coverity static

Re: Reduce 99% of your memory leaks with this simple trick!

2018-01-11 Thread Chris Olivier
I think there's tons of books on "best practices" already, so I wouldn't want to trouble you :) Are we running coverity static analysis? It catches those kinds of things. On Thu, Jan 11, 2018 at 7:04 PM, Bhavin Thaker wrote: > Would it make sense to have a developer

Re: Reduce 99% of your memory leaks with this simple trick!

2018-01-11 Thread Bhavin Thaker
Would it make sense to have a developer best practices section on the Apache wiki where such guidance can be documented for future reference? Bhavin Thaker. On Thu, Jan 11, 2018 at 9:56 AM Anirudh wrote: > Hi, > > > I have been thinking about exception handling

Re: Reduce 99% of your memory leaks with this simple trick!

2018-01-11 Thread Anirudh
Hi, I have been thinking about exception handling specifically inside spawned threads. As Tianqi mentioned, there is already a mechanism with LOG(FATAL) or CHECK for exception handling inside main Thread. For exception handling inside spawned threads I see two places: iterators and operators.

Re: Reduce 99% of your memory leaks with this simple trick!

2018-01-11 Thread McCollum, Cliff
+1 to this. I once worked on a 500k LOC C++ distributed system for the Telecom industry that only had new() and delete() calls on six lines. Everything else was done via the RAII pattern with std:: The net effect was that even in such a large system, we recorded only three memory leaks in six

Reduce 99% of your memory leaks with this simple trick!

2018-01-11 Thread Pedro Larroy
Hi I would like to encourage contributors to use RAII idioms in C++ whenever possible to avoid resource leaks. RAII is an ugly acronym that stands for Resource Acquisition Is Initialization, which basically means that you should almost never use explicit new and delete operators and instead use