Linear Collider Forum



Home » Software Tools » LCIO » copy constructor for LCFixedObject
Re: copy constructor for LCFixedObject [message #1303 is a reply to message #1301] Tue, 20 November 2007 03:07 Go to previous messageGo to previous message
gaede
Messages: 233
Registered: January 2004
Location: DESY, Hamburg
Hi,

no LCIO class has a copy c'tor as an implementation is not straight forward (deep vs. shallow) copy. We plan to hav some safe 'clone()' methods in a future release. The LCFixedObject and subclasses thereof are essentially handles to the underlying LCGenericObjectImpl and depending on how it was created it takes ownership of the underlying object or not. So you should _not_ copy LCFixedObjects but rather implement a clone() method in your subclass that creates a new LCGenericObject and copies the data.

Frank.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:new LCIO release v01-09
Next Topic:getEventMap(), memory consumption
Goto Forum:
  


Current Time: Wed Oct 17 21:35:01 Pacific Daylight Time 2018
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.1.
Copyright ©2001-2010 FUDforum Bulletin Board Software