1

I'm profiling some Flash code, and one of the methods that's taking a lot of time is BitmapData.ctor. What, err, is that?

David Wolever
  • 148,955
  • 89
  • 346
  • 502

2 Answers2

11

It's the constructor of the BitmapData class.

Constructors have the same name as their class in many languages, but these languages still have to find a way to distinguish the two symbols internally. Thus, the manifestation of ctor (or .ctor) methods that you can find neither in your code nor in the documentation.

Frédéric Hamidi
  • 258,201
  • 41
  • 486
  • 479
1

If you try to create a BitmapData with invalid data you get this in your error stack:

ArgumentError: Error #2015: Invalid BitmapData. at flash.display::BitmapData/ctor() at flash.display::BitmapData()

So - that suggests to me that ctor() is just an init() function run from the BitmapData constructor.

Stray
  • 1,689
  • 1
  • 11
  • 19