// 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:
parent
ba72e1e935
commit
3993c2b45d
1 changed files with 5 additions and 4 deletions
|
@ -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_
|
||||
|
|
Loading…
Reference in a new issue