diff --git a/src/DnaSeqStr.h b/src/DnaSeqStr.h index 5d412e1efb8806508c71e5cc22ee0585af52912b..b9cb795dfe9864dfad63554e7bcadc19c7d67ffb 100644 --- a/src/DnaSeqStr.h +++ b/src/DnaSeqStr.h @@ -8,8 +8,11 @@ #ifndef DNASEQSTR_H_ #define DNASEQSTR_H_ +#include <iostream> #include "FqConstants.h" +using namespace std; + /* * Here, for performance matters, do not want to have to do a memmove nor strcpy or strcat to extract only DNA sequence for all * the fastq records that we'll have to process (potentially millions). So, use a structure to store start position of DNA sequence in buffer and its length. @@ -23,13 +26,13 @@ class DnaSeqStr { public : - char * fq_record_buf; //[MAX_FQ_RECORD_LENGTH]; + char * const fq_record_buf; //[MAX_FQ_RECORD_LENGTH]; int start_idx; int length; public: - DnaSeqStr() { - fq_record_buf=new char[MAX_FQ_RECORD_LENGTH]; + DnaSeqStr():fq_record_buf(new char[MAX_FQ_RECORD_LENGTH]) { + cout<<"Calling DnaSeqStr constructor"<<endl; length=0; start_idx=0; } @@ -41,7 +44,8 @@ public: } ~DnaSeqStr() { - delete fq_record_buf; + cout<<"Calling DnaSeqStr destructor"<<endl; + delete fq_record_buf[]; } }; diff --git a/src/fqwriter.cpp b/src/fqwriter.cpp index a0e2e09a85b37edcbcae5d94b3c998e243db343e..37045e30ba3feea4b5680b13604e5366f0907527 100644 --- a/src/fqwriter.cpp +++ b/src/fqwriter.cpp @@ -24,7 +24,7 @@ #include "srp.h" #include "FqBaseBackend.h" -#define DEBUG +//#define DEBUG #ifdef DEBUG #include <iostream> using namespace std; diff --git a/src/read_utils.cpp b/src/read_utils.cpp index 71f9367b0d8bf1fa227798332addcf056b49e4b4..32b9bb113454272cee3d44c831bd197b96e7d37f 100644 --- a/src/read_utils.cpp +++ b/src/read_utils.cpp @@ -29,7 +29,7 @@ #include "DnaSeqStr.h" #include "read_utils.h" #include "rock_commons.h" -#define DEBUG +//#define DEBUG #ifdef DEBUG #include <cassert> diff --git a/src/rock.cpp b/src/rock.cpp index 05cf09623efe813b0636f7c93642816d5ec720d1..652d7217fa2db6fddb1f07b459a5ed4aaffaf7bb 100755 --- a/src/rock.cpp +++ b/src/rock.cpp @@ -47,7 +47,7 @@ using namespace std; -// #define BENCHMARK +#define BENCHMARK #ifdef BENCHMARK #include <sys/time.h> #include <sys/resource.h>