TOF: Fix out of scope shared ptr#920
Conversation
|
@Barthelemy this is the fix for the issue, now the pad is a data member, memory leak will not be an issue anymore and the pad is kept in memory for future use |
|
This is better, thank you. My only fear is that the pad is destroyed by the histogram when it is itself destroyed. Could you confirm that the "functions" in the listoffunctions are not deleted when the histo is deleted ? |
|
Hi @Barthelemy I tested it and ran successfully, indeed it should not matter as the object is recreated if it was deleted in the meantime |
|
but maybe I could still check on th eobject itself e.g. with |
|
the problem is that the internal pointer of mMessagePad might be deleted by the histogram without any way of knowing. You can see here that the deletion of the histogram provokes the deletion of all "functions" added to it, including your pad: https://root.cern.ch/doc/master/TH1_8cxx_source.html I have had my fair share of problems with these "functions" in Run 1 and 2. I am thinking that the simpler is perhaps to create the TPaveText each time We rely of course on the fact that objects are transient and not kept in memory. Each time you get a new version, you add a fresh pave text. |
|
Ok, then I will revert to how it was before, sounds good! |
70cf346 to
452aee5
Compare
|
Hi @Barthelemy so this is the sumary: |
452aee5 to
9180cbd
Compare
- Check that message is there before filling it - Extend documentation
9180cbd to
b93a0fa
Compare
- Check that message is there before filling it - Extend documentation
No description provided.