-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes memory leaks inside CoverageTool and improves style #324
base: master
Are you sure you want to change the base?
Conversation
includes several style improvements
bc8bb89
to
02dfbfa
Compare
- adds destructors for classes and respective calls for them - provides a certain background for implementing test project collection in the future
02dfbfa
to
4eb6f3b
Compare
@@ -31,6 +31,9 @@ CorProfiler::~CorProfiler() | |||
|
|||
HRESULT STDMETHODCALLTYPE CorProfiler::Initialize(IUnknown *pICorProfilerInfoUnk) | |||
{ | |||
setbuf(stdout, NULL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Не забыть удалить дебаг логи
std::vector<std::vector<char>> serializedCoverage; | ||
std::mutex collectedMethodsMutex; | ||
std::vector<MethodInfo> collectedMethods; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private?
return IsMain(moduleName, moduleSize, method) || (!profilerState->isTestExpected && !profilerState->collectMainOnly) | ||
|| (profilerState->isTestExpected && doesContainAssembly(assemblyName, assemblySize, profilerState->approvedAssemblies)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Split into two variables
bool IsEnvVarPresent(const char *name) { | ||
auto value = std::getenv(name); | ||
return value != nullptr && value[0] == '1'; | ||
} | ||
|
||
char *CheckEnvVarAndGet(const char *name) { | ||
auto str = std::getenv(name); | ||
profiler_assert(str); | ||
return str; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Странный нейминг
No description provided.