FMX: Does TBitmap.SetSize initialise the pixels?

  

With the following code, will the pixels be initialised to zero (fully transparent), or is there a chance that some random memory will be left in the image?
Bmp := TBitmap.Create;
Bmp.SetSize(400, 400);

Of course I can use Bmp.Clear(0) to make sure it’s cleared, but I don’t want to if not necessary. It does seem though that on at least some computers SetSize does not initialise the pixels. This would be surprising since I’m sure that the equivalent function in VCL does.
Of course the Embarcadero documentation for SetSize doesn’t mention this.
I’m using Delphi 10.4 and building for Windows 32bit.

Comments are closed.