You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following array allocated using new[] at line 77 should be deleted but never is.
bool *geneDetected = newbool[featuresNumber]; //=true if a gene was detected in at least one cellmemset((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
The text was updated successfully, but these errors were encountered:
The following array allocated using
new[]
at line 77 should be deleted but never is.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
The text was updated successfully, but these errors were encountered: