Ticket #28 (new task) — at Initial Version

Opened 15 years ago

Last modified 15 years ago

Memory management

Reported by: smidl Owned by: smidl
Priority: major Milestone: Design issues
Component: bdm core Version:
Keywords: Cc: smidl@…, miroslav.pistek@…

Description

At present, we have very slack policy for memory management.

The only "rule" is that all offsprings of class root must have a constructor with no parameters. The actual construction is done by methods: from_setting or set_parameters.

This gets complicated when pointers are used, e.g. in class merger where method set_sources obtains pointers from outside, and these pointers may or may not be used outside of it. At present it is solved by variable "bool own" in merger. In other classes (e.g. PF or MPF) it is not solved yet.

We need: 1) to define a policy on this - an agreed way how to handle these situations. 2) the policy should be written as a documentation file - preferably library/doc/local/memory_management.dox 3) the code is to be checked if the policy is consistently implemented

Note: See TracTickets for help on using tickets.