}
void nsVoidArray::Compact(){  if (mImpl) {    PRInt32 count = mImpl->mCount;    if (IsArrayOwner() && GetArraySize() > count) {      Impl* doomedImpl = mImpl;      if (count > 0) {        char* bytes = new char[sizeof(Impl) + sizeof(void*) * (count - 1)];        Impl* newImpl = NS_REINTERPRET_CAST(Impl*, bytes);        if (newImpl)          nsCRT::memcpy(newImpl->mArray, mImpl->mArray, count * sizeof(void*));        mImpl = newImpl;        mImpl->mBits = 0;        SetArraySize(count);        mImpl->mCount = count;        SetArrayOwner(PR_TRUE);      }      else {        mImpl = nsnull;      }      delete[] NS_REINTERPRET_CAST(char*, doomedImpl);    }  }}