// January 08, 2002: Fixed bug in call to realloc - credit due to Nigel Gent and

//      Eike Petersen


git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@9 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
aandrei 2002-01-09 05:25:17 +00:00
parent ba72e1e935
commit 3993c2b45d

View file

@ -8,13 +8,11 @@
// purpose is hereby granted without fee, provided that the above copyright
// notice appear in all copies and that both that copyright notice and this
// permission notice appear in supporting documentation.
// The author or Addison-Welsey Longman make no representations about the
// The author or Addison-Wesley Longman make no representations about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
////////////////////////////////////////////////////////////////////////////////
// Last update: June 20, 2001
#ifndef SINGLETON_INC_
#define SINGLETON_INC_
@ -104,7 +102,8 @@ namespace Loki
using namespace Private;
TrackerArray pNewArray = static_cast<TrackerArray>(
std::realloc(pTrackerArray, elements + 1));
std::realloc(pTrackerArray,
sizeof(T) * (elements + 1)));
if (!pNewArray) throw std::bad_alloc();
LifetimeTracker* p = new ConcreteLifetimeTracker<T, Destroyer>(
@ -438,6 +437,8 @@ namespace Loki
// Change log:
// May 21, 2001: Correct the volatile qualifier - credit due to Darin Adler
// 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
// Eike Petersen
////////////////////////////////////////////////////////////////////////////////
#endif // SINGLETON_INC_