// March 08, 2002: moved the assignment to pTrackerArray in SetLongevity to fix
// exception safety issue. Credit due to Kari Hoijarvi git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@13 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
parent
783d4e4bc5
commit
48bd335289
1 changed files with 5 additions and 3 deletions
|
@ -106,12 +106,12 @@ namespace Loki
|
||||||
sizeof(T) * (elements + 1)));
|
sizeof(T) * (elements + 1)));
|
||||||
if (!pNewArray) throw std::bad_alloc();
|
if (!pNewArray) throw std::bad_alloc();
|
||||||
|
|
||||||
LifetimeTracker* p = new ConcreteLifetimeTracker<T, Destroyer>(
|
|
||||||
pDynObject, longevity, d);
|
|
||||||
|
|
||||||
// Delayed assignment for exception safety
|
// Delayed assignment for exception safety
|
||||||
pTrackerArray = pNewArray;
|
pTrackerArray = pNewArray;
|
||||||
|
|
||||||
|
LifetimeTracker* p = new ConcreteLifetimeTracker<T, Destroyer>(
|
||||||
|
pDynObject, longevity, d);
|
||||||
|
|
||||||
// Insert a pointer to the object into the queue
|
// Insert a pointer to the object into the queue
|
||||||
TrackerArray pos = std::upper_bound(
|
TrackerArray pos = std::upper_bound(
|
||||||
pTrackerArray,
|
pTrackerArray,
|
||||||
|
@ -439,6 +439,8 @@ namespace Loki
|
||||||
// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
|
// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
|
||||||
// January 08, 2002: Fixed bug in call to realloc - credit due to Nigel Gent and
|
// January 08, 2002: Fixed bug in call to realloc - credit due to Nigel Gent and
|
||||||
// Eike Petersen
|
// Eike Petersen
|
||||||
|
// March 08, 2002: moved the assignment to pTrackerArray in SetLongevity to fix
|
||||||
|
// exception safety issue. Credit due to Kari Hoijarvi
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#endif // SINGLETON_INC_
|
#endif // SINGLETON_INC_
|
||||||
|
|
Loading…
Add table
Reference in a new issue