GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Bugs, Fixes, Releases » Question about using pointers to fill TClonesArray
Question about using pointers to fill TClonesArray [message #17672] Thu, 18 December 2014 15:58 Go to previous message
MartinJGaluska is currently offline  MartinJGaluska
Messages: 203
Registered: March 2010
Location: Germany
first-grade participant
From: *physik.uni-giessen.de
Hello,

I am trying to find and fix memory leaks in my own code and have used code similar to the following line
PndTrackCand* myCand = new ((*fTrackCandArray)[i])PndTrackCand(trackFinder.GetTrackCand(i));

from https://subversion.gsi.de/trac/fairroot/browser/pandaroot/trunk/mvd/MvdT racking/PndMvdRiemannTrackFinderTask.cxx line 162.

delete myCand;

is not present and I am wondering if it is necessary and if not, why.

Kind regards,
Martin

[Updated on: Thu, 18 December 2014 15:59]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [FIXED] fts/FtsTracking/PndFtsHoughSpace.h::ExportTH2S() declared but not implemented
Next Topic: [FIXED] Memory leak in PndSttHitProducerRealFull / PndFtsHitProducerRealFull?
Goto Forum:
  


Current Time: Fri Nov 22 02:57:18 CET 2024

Total time taken to generate the page: 0.00638 seconds