Skip to content

Conversation

@ellert
Copy link
Contributor

@ellert ellert commented Apr 3, 2017

"if (gR) { ... }" will not work as a check whether the global interface object is freed. gR - the pointer to the TRInterface object - is assigned by new. Only one instance of this class can be created. There is no explicit delete of this global object, but it is destroyed when the program exits. But this destruction of remaining object when the program ends does not reset the gR pointer to NULL, so using "if (gR) { ... }" as a test to check whether the object is destroyed or not will not work. I think this PR implements the intended behaviour.

@phsft-bot
Copy link

Can one of the admins verify this patch?

@Axel-Naumann
Copy link
Member

Thanks, Mattias!

@phsft-bot build!


TRInterface::~TRInterface()
{
statusEventLoop = kFALSE;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should'nt this also contains

if (gR == this) gR = nullptr;

?

@peremato
Copy link
Contributor

peremato commented Apr 5, 2017

@phsft-bot build just on slc6/gcc62

@phsft-bot
Copy link

Starting build on slc6/gcc62 and CMake flags -Dccache=ON -Dimt=OFF

@Axel-Naumann
Copy link
Member

@lmoneta could you rebase instead of merging?

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.

6 participants