The destructor on the DateFormat class is virtual, so i'm frankly
astonished this isn't just chasing and calling a pointer to nowhere. I
guess we got "lucky" and DateFormat and DateTimePatternGenerator have
a similar enough layout by chance that this works. However it's entirely
at the whim of the compiler as to whether this keeps working or not, so
we should fix it and call the correct cleanup function.
The skeleton generator is currently using udat_close to delete objects created with udatpg_open; it should be using udatpg_close instead.
The C-side implementation of udat_close calls straight into the C++ delete operator:
The destructor on the DateFormat class is virtual, so i'm frankly astonished this isn't just chasing and calling a pointer to nowhere. I guess we got "lucky" and DateFormat and DateTimePatternGenerator have a similar enough layout by chance that this works. However it's entirely at the whim of the compiler as to whether this keeps working or not, so we should fix it and call the correct cleanup function.