key4hep / k4FWCore

Core Components for the Gaudi-based Key4hep Framework
Apache License 2.0
10 stars 26 forks source link

Delete the object wrapped by a DataWrapper when the DataWrapper is destructed #190

Closed kjvbrt closed 4 months ago

kjvbrt commented 5 months ago

BEGINRELEASENOTES

ENDRELEASENOTES

Currenty DataWrapper deletes nullptr:

EventDataSvc         INFO Clearing Podio DataWrappers...
EventDataSvc         INFO Podio DataWrappers cleared. 
EventDataSvc         INFO Clearing the Store...                                                            
DataWrapper: Deleting N6HepMC312GenEventDataE?
DataWrapper: is_owner: 1  
DataWrapper: m_data: 0xbaf5870
DataWrapper: No                                                                                            
DataWrapper: Deleting N7edm4hep20MCParticleCollectionE?
DataWrapper: is_owner: 1                                                                                   
DataWrapper: m_data: 0                               
DataWrapper: Yes
jmcarcell commented 4 months ago

I'm having a déjà vu, I'm pretty sure someone else or me said something about this but I can't seem to find anything... I'll edit a bit the title since if you use PodioInput and PodioOutput then everything gets wrapped in these DataWrappers so it does apply to podio based objects.