-
Notifications
You must be signed in to change notification settings - Fork 531
Open
Labels
issue: codeLikely to be an issue with STAR codeLikely to be an issue with STAR code
Milestone
Description
The following array allocated using new[]
at line 77 should be deleted but never is.
bool *geneDetected = new bool[featuresNumber]; //=true if a gene was detected in at least one cell
memset((void*) geneDetected, 0, featuresNumber);
Suggestion 1: Add the following statement at or after line 116:
filteredCells.nGeneDetected=0;
for (uint32 ii=0; ii<featuresNumber; ii++) {
if (geneDetected[ii])
filteredCells.nGeneDetected++;
};
+ delete[] geneDetected;
Suggestion 2: Replace with a std::vector
- bool *geneDetected = new bool[featuresNumber]; //=true if a gene was detected in at least one cell
- memset((void*) geneDetected, 0, featuresNumber);
+ std::vector<bool> geneDetected (featuresNumber); //=true if a gene was detected in at least one cell; default-initialized to false
Metadata
Metadata
Assignees
Labels
issue: codeLikely to be an issue with STAR codeLikely to be an issue with STAR code