REVIEW: Memory Leak - SGReaderWriterXML sgLoad3DModel_internal()

4,352 bytes in 272 blocks are definitely lost
This commit is contained in:
Scott Giese 2020-08-22 21:30:41 -05:00
parent 6160fce2ae
commit 6f6c3a0e05

View File

@ -594,6 +594,7 @@ sgLoad3DModel_internal(const SGPath& path,
// clone all structural nodes here we need that extra // clone all structural nodes here we need that extra
// reference to the original object // reference to the original object
SGDatabaseReference* databaseReference; SGDatabaseReference* databaseReference;
// REVIEW: Memory Leak - 4,352 bytes in 272 blocks are definitely lost
databaseReference = new SGDatabaseReference(modelResult.getNode()); databaseReference = new SGDatabaseReference(modelResult.getNode());
model->addObserver(databaseReference); model->addObserver(databaseReference);