On Oct 4, 9:19=A0am, "Chris M. Thomasson" <n...@[EMAIL PROTECTED]
> wrote:
> On every version of MSVC, I get:
>
> custom_allocator::allocate(00365B28, 1028)
> custom_allocator::deallocate(00365B28, 1028)
> custom_allocator::allocate(00362850, 2240)
> custom_allocator::deallocate(00362850, 2240)
> custom_allocator::allocate(00366FA8, 11204)
> custom_allocator::deallocate(00366FA8, 2240)
>
> Well, AFFLICT, MSVC has a NASTY bug indeed! That too bad. There is
nothin=
g
> worse that a bug in the ****%ing compiler! =A0Ouch.
This should help:
void operator delete [](void* mem, std::size_t size) throw()
{
#if defined(_MSC_VER)
# if _MSC_VER =3D=3D 1310 || _MSC_VER =3D=3D 1400 || _MSC_VER =3D=3D
1500
size =3D size * *(size_t*)mem + sizeof(size_t);
# else
# error "check this MSVC ver for the error with delete[]"
# endif
#endif
custom_allocator::deallocate(mem, size);
}
Dmitriy V'jukov


|