This method clears several objects given by either a partial name or pattern or a simple extension.
Sometimes it can happen that, during a scripted process, several orphaned objects remain in the global storage (e.g. when a multi-study design matrix is computed and an error occurs during the script). In such cases, one way to free up several objects at once is by using this method.
ROOT::ClearObjects - delete multiple objects FORMAT: xff.ClearObjects(dspec); Input fields: dspec (partial) filename (or pattern) No output fields.
To clear all currently loaded SDM objects, one would use the syntax
% get root object handle root = xff; % call clear with simple extension root.ClearObjects('sdm');
To clear all objects that start with
colin_ the following syntax will do:
% get root object handle root = xff; % call clear with pattern root.ClearObject('colin_*');
Please note that this method should not be used as part of a function (or batch file) that is integrated into a larger context, as it is possible to clear objects that are still in use by calling methods (or other processes). This method has rather been implemented for simplify the development of methods, so that during debugging it is relatively easy to remove certain types (name patterns) of objects.