fCount = array.count();
fReserveCount = gMIN_ALLOC_COUNT;
fAllocCount = SkMax32(fReserveCount, fCount);
- fMemArray = sk_malloc(sizeof(T) * fAllocCount);
+ fMemArray = sk_malloc_throw(sizeof(T) * fAllocCount);
fPreAllocMemArray = NULL;
if (DATA_TYPE) {
fCount = count;
fReserveCount = gMIN_ALLOC_COUNT;
fAllocCount = SkMax32(fReserveCount, fCount);
- fMemArray = sk_malloc(sizeof(T) * fAllocCount);
+ fMemArray = sk_malloc_throw(sizeof(T) * fAllocCount);
fPreAllocMemArray = NULL;
if (DATA_TYPE) {
memcpy(fMemArray, array, sizeof(T) * fCount);