Details
-
Improvement
-
Resolution: Done
-
Minor - P4
-
None
-
None
-
Fully Compatible
Description
In dbtests/jstests.cpp many of the tests have something like:
Scope * s = globalScopeEngine->newScope();
...
delete s;
This should be changed so that instead of having a normal pointer for s, we use a smart pointer. This also means that we will not have to have the delete call at the end of each test.
Though this method works, it is not exception safe and is not really in line with best practices. Additionally, it seems desirable to have consistency throughout the code base (even in tests) regarding the (non)use of delete