/[svn]/linuxsampler/trunk/src/common/ResourceManager.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/common/ResourceManager.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 924 by persson, Mon Feb 6 18:07:17 2006 UTC revision 925 by schoenebeck, Sat Oct 21 14:50:32 2006 UTC
# Line 3  Line 3 
3   *   LinuxSampler - modular, streaming capable sampler                     *   *   LinuxSampler - modular, streaming capable sampler                     *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *
6     *   Copyright (C) 2005, 2006 Christian Schoenebeck                        *
7   *                                                                         *   *                                                                         *
8   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
9   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
# Line 116  class ResourceManager { Line 117  class ResourceManager {
117                  entry.resource = NULL;                  entry.resource = NULL;
118                  entry.consumers.insert(pConsumer);                  entry.consumers.insert(pConsumer);
119                  ResourceEntries[Key] = entry;                  ResourceEntries[Key] = entry;
120                  // actually create the resource                  try {
121                  entry.resource = Create(Key, pConsumer, entry.arg);                      // actually create the resource
122                        entry.resource = Create(Key, pConsumer, entry.arg);
123                    } catch (...) {
124                        // creating the resource failed, so remove the entry
125                        ResourceEntries.erase(Key);
126                        // rethrow the same exception
127                        throw;
128                    }
129                  // now update the entry with the created resource                  // now update the entry with the created resource
130                  ResourceEntries[Key] = entry;                  ResourceEntries[Key] = entry;
131                  OnBorrow(entry.resource, pConsumer, entry.arg);                  OnBorrow(entry.resource, pConsumer, entry.arg);

Legend:
Removed from v.924  
changed lines
  Added in v.925

  ViewVC Help
Powered by ViewVC