--- parser3/src/include/pa_array.h 2003/02/21 10:55:43 1.57.2.25 +++ parser3/src/include/pa_array.h 2003/02/26 10:17:30 1.57.2.26 @@ -8,7 +8,7 @@ #ifndef PA_ARRAY_H #define PA_ARRAY_H -static const char* IDENT_ARRAY_H="$Date: 2003/02/21 10:55:43 $"; +static const char* IDENT_ARRAY_H="$Date: 2003/02/26 10:17:30 $"; // includes @@ -51,9 +51,12 @@ public: Exception::undefined_source, "Array::Array(%d, %d) too small", initial, delta); + // we can't use new(0) here[like we did in Hash] because we need to use realloc + // on MSVC new returns NOT pointer learned from pa_malloc, so we can't do new+realloc felements=static_cast(calloc(fallocated*sizeof(T))); } override ~Array() { + // see comment in ctor T *last=felements+fused; for(T *current=felements; current~T(); // manually invoking destructors