Help me!怎么把一个动态二维数组清零?
TPixelQueueItem = record
PrevPoint: TImagePoint;
NextPoint: TImagePoint;
end;
TPixelQueue = array of array of TPixelQueueItem;
var
PixelQueue: TPixelQueue;
begin
SetLength(PixelQueue,ImageHeight,ImageWidth);
FillChar(PixelQueue,ImageWidth * ImageHeight * SizeOf(TPixelQueueItem),0);{这句不行!}
end;
如果循环清零,效率太慢:
for I := 0 to High(PixelQueue) do
FillChar(PixelQueue[I],ImageWidth * SizeOf(TPixelQueueItem),0);