Linear Collider Forum

Home » Software Tools » LCIO » copy constructor for LCFixedObject
Re: copy constructor for LCFixedObject [message #1306 is a reply to message #1304] Tue, 20 November 2007 05:09 Go to previous messageGo to previous message
Messages: 233
Registered: January 2004
Location: DESY, Hamburg
Hi Martin,
one of the design principles in LCIO is that objects are created on the heap - either by the user or be the LCReader - and that all collections only store pointers. This is true for the LCCollection and also for all user defined STL containers. So you should never ever use a vector of LCIO objects or the like as this is asking for trouble with memory management and might result in severe runtime overhead due to object relocation.
Please do not use copy c'tors with LCIO objects, we will probably make them protected in a future release when we implenent the clone method.
If you could let me know what exactly you would like to do I can probably suggest a more LCIO complaiant way of achieving this.

Cheers, 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: Fri Dec 6 05:08:37 Pacific Standard Time 2019
.:: Contact :: Home ::.

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