[GenABEL-dev] [Genabel-commits] r1803 - pkg/ProbABEL/src

L.C. Karssen lennart at karssen.org
Fri Aug 22 14:33:56 CEST 2014


Hi again Maksim,

By the way, Jenkins informed me that you introduced a memory leak. See
the line where you create the char[]. In this case I would simply use a
C++ string. Much simpler, no memory leaks and since we're using
std::cout also no problems when printing.


Best,

Lennart.

On 21-08-14 07:57, noreply at r-forge.r-project.org wrote:
> Author: maksim
> Date: 2014-08-21 07:57:37 +0200 (Thu, 21 Aug 2014)
> New Revision: 1803

> Modified: pkg/ProbABEL/src/phedata.cpp
> ===================================================================
> --- pkg/ProbABEL/src/phedata.cpp	2014-08-15 12:59:56 UTC (rev 1802)
> +++ pkg/ProbABEL/src/phedata.cpp	2014-08-21 05:57:37 UTC (rev 1803)
> @@ -27,6 +27,7 @@
>  #include <fstream>
>  #include <cstdarg>
>  #include <cstdlib>
> +#include <cstring>
>  
>  using std::cout;
>  using std::cerr;
> @@ -66,6 +67,7 @@
>      std::ifstream myfile(fname);
>      char *line = new char[BFS];
>      char *tmp  = new char[BFS];
> +    char *interaction_cov_name  = new char[BFS];
>      noutcomes = noutc;
>      is_interaction_excluded = false;
>  

-- 
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
L.C. Karssen
Utrecht
The Netherlands

lennart at karssen.org
http://blog.karssen.org
GPG key ID: A88F554A
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: OpenPGP digital signature
URL: <http://lists.r-forge.r-project.org/pipermail/genabel-devel/attachments/20140822/395ca2aa/attachment.sig>


More information about the genabel-devel mailing list