Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix potential memory leak#108

Merged
scapella merged 1 commit intoinab:trimAlfrom
fplazaonate:trimAl
Mar 21, 2025
Merged

Fix potential memory leak#108
scapella merged 1 commit intoinab:trimAlfrom
fplazaonate:trimAl

Conversation

@fplazaonate
Copy link
Contributor

This commit fixes these g++ warning messages:

g++ -Wall -O2  -c compareFiles.cpp
alignment.cpp: In member function ‘alignment* alignment::getTranslationCDS(int, int, int*, std::string*, sequencesMatrix*, alignment*)’:
alignment.cpp:1639:10: warning: ‘void operator delete(void*, std::size_t)’ called on pointer returned from a mismatched allocation function [-Wmismatched-new-delete]
 1639 |   delete mappedSeqs;
      |          ^~~~~~~~~~
alignment.cpp:1559:36: note: returned from ‘void* operator new [](std::size_t)’
 1559 |   mappedSeqs = new int[newSequences];
      |                                    ^
alignment.cpp:1640:10: warning: ‘void operator delete(void*, std::size_t)’ called on pointer returned from a mismatched allocation function [-Wmismatched-new-delete]
 1640 |   delete tmpSequence;
      |          ^~~~~~~~~~~
alignment.cpp:1591:36: note: returned from ‘void* operator new [](std::size_t)’
 1591 |   tmpSequence = new int[oldResidues];
      |                                    ^
alignment.cpp:1641:10: warning: ‘void operator delete(void*, std::size_t)’ called on pointer returned from a mismatched allocation function [-Wmismatched-new-delete]
 1641 |   delete selectedRes;
      |          ^~~~~~~~~~~
alignment.cpp:1572:36: note: returned from ‘void* operator new [](std::size_t)’
 1572 |   selectedRes = new int[oldResidues];

@scapella scapella merged commit 53f2afd into inab:trimAl Mar 21, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants