GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Bugs, Fixes, Releases » [FIXED] FairWriteoutBuffer::FillNewData and object ownership (memory leak)
[FIXED] FairWriteoutBuffer::FillNewData and object ownership (memory leak) [message #14374] Fri, 18 January 2013 23:03 Go to previous message
Oliver Merle is currently offline  Oliver Merle
Messages: 13
Registered: December 2010
occasional visitor
From: *vpn.uni-giessen.de
I am a bit confused about the question whether object ownership of the FairTimeStamp instance passed to FairWriteoutBuffer::FillNewData is transferred to the buffer or not.

I had a look at the implementation of the buffers in the SDS package and found that the digis therein are allocated on the heap but never freed. Therefore I assumed that the ownership has been transferred to the buffer and searched for the corresponding deallocation in the implementation of FairWriteoutBuffer+derived. Actually there is none. Finally, I've ran the TimeBasedSimulation macro in the macros/mvd folder and counted the FairTimeStamp instances at runtime - the number was increasing continuously, as expected.

But if the buffer is not freeing the digits, how can the user know if a digit can be safely deallocated? Wouldn't it make more sense to delete the digits after they have been written to the TClonesArray?




[Updated on: Thu, 31 January 2013 15:59] by Moderator

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [FIXED] magnet geometry simulation problem
Next Topic: [WONTFIX] sep12 external package crash during installation on fedora 18
Goto Forum:
  


Current Time: Fri Nov 22 15:33:11 CET 2024

Total time taken to generate the page: 0.00783 seconds